Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 two csv string comparisons

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-02-20 : 08:17:52
gaurav writes "I need to compare 2 csv(comma seperated) strings of IDs stored on two different tables so as to check whether the specified IDs present in the string(csv string 1) is there in another string (csv string 2) of IDs."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-20 : 09:06:56
Search for where in @MyCSV in this topic
http://sqlteam.com/forums/topic.asp?TOPIC_ID=55210

Also you should not store csv values in the column. Instead, store each value in each row

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

CactusJuice
Starting Member

46 Posts

Posted - 2006-06-06 : 17:54:22
Why not? For example, I want to record which search options a visitor is using. I might have several multi-select List boxes, check box lists, etc. One list box might have three options chosen and another five. Storing in CSV seems to be the best way, no?

quote:
Originally posted by madhivanan
Also you should not store csv values in the column. Instead, store each value in each row

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-06 : 17:56:32
quote:

Storing in CSV seems to be the best way, no?



It certainly isn't the best way to store things in the database. So is the data really stored like this in the table or is this CSV string coming from the client?

Tara Kizer
aka tduggan
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-07 : 01:58:57
quote:
Originally posted by CactusJuice

Why not? For example, I want to record which search options a visitor is using. I might have several multi-select List boxes, check box lists, etc. One list box might have three options chosen and another five. Storing in CSV seems to be the best way, no?

quote:
Originally posted by madhivanan
Also you should not store csv values in the column. Instead, store each value in each row




Read about Normalisation
http://www.datamodel.org/NormalizationRules.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -