Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Run same script for multiple clients

$
0
0
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.....DECLARE @ClientID varchar (MAX)DECLARE @UserID varchar (MAX)SET @ClientID = 111 -- Replace with Client IDSET @UserID = 5656 -- Replace with your ID--VIDEO(1)INSERT INTO document (documentTitle,actualFileName,clientID,documentDescription,documentCategoryLV,updateKey,savedUserID,savedDateTime,contentType,url,effectiveBeginDate,effectiveEndDate,featureYN,language,imageID,sequence,effectiveShowAsNewDate,javascriptURL,homePageYN,enrollmentYN,bestFitVideoYN,benefitPlanTypeID,eeMarqueeUntilDate,imageName,thumbnailImageName,thumbnailImageID) VALUES ('Health informational video','',@ClientID,'Health Rovion Video',16,1,@UserID,GETDATE(),3,'<a href="#this" onclick="try{playThisVideoNow(''20110824181720e66FsHYTkWv'');}catch(e){}">View Video on Health</a>','1/1/1900','12/31/9999',NULL,NULL,NULL,NULL,NULL,'<script type="text/javascript" src="https://engaged-by.rovion.com/play/20110824181720e66FsHYTkWv"></script>',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL)Thanks!

Viewing all articles
Browse latest Browse all 3145

Trending Articles