Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IN Clause
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00696235
Message ID:
00696287
Vues:
13
>> 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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform