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
 Transact-SQL (2000)
 CSV String

Author  Topic 

mahimam_2004
Starting Member

40 Posts

Posted - 2006-12-14 : 22:03:38
Hi,

I have a variable like @states=NY,VA,AL,CA.

Now i want to use the above string in the IN clause.How to separate those string and use.

Select * from xxx where @State IN('NY','VA','AL','CA')

Thanks in advance

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-12-14 : 22:41:05
Cross post.

CODO ERGO SUM
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-14 : 23:20:23
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76428

Madhivanan

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

- Advertisement -