Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IN Clause
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00696235
Message ID:
00696287
Views:
14
>> I should be able to do what I want with an IN clause.

You'll have to double-up the quotes around the strings in the parameter:

' ''100'', ''110'', ''120'' '

When you use the EXECUTE command to process you're query, SQL Server will see:

'100','110','120'

However, as Sergey mentioned, you would be better off if you didn't depend on Dynamic SQL. There are scripts that www.swynk.com that will parse a comma delimited list. you could then put the values into a temp table.

Play with both approaces.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform