Hi, kind of new to sql so help would be much appreciated. I have a script that needs to be run for 50 different @ClientID. I dont want to run this script individually for each clientid. Would 'SET @clientID in (111, 222, 333) work? I've been told that it wouldn't. Short version of the script is.....

If it is coming from a database, you can use a select instead of the values method.

If this is coming from an app (via delimited fashion maybe), then a loop would work with the values method you have there.It is also possible to dump the values for clientid into a temp table and then use the select statement for the insert instead.

Make sense?

Jason AKA CirqueDeSQLeilI have given a name to my pain...MCM SQL Server, MVPSQL RNNR