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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-07-21 : 09:39:33
|
| Don writes "Hi - I am having an issue where I am trying to pass in a set of values for the IN the keyword for example:WHERE State IN ('CA','NY','KS')I would like to pass this in dynamically using a stored procedure parameter:@StateCodes Varchar(50)When I pass this in using ADO.NET in a stored procedure parameter, it looks like it should for T-SQL to be able to handle it properly e.g. ('CA','NY','KS')Do I need to pass it in differently? I have tried escaping with an additional apostrophe as I have seen in some other posts but that does not work. Any help is appreciated. Thanks!" |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-21 : 11:05:56
|
| orwhere ','+@StateCodes+',' like '%,'+state+',%'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|