sql - Update column information -


i trying update information in column mgrstat 3 , mass enter information. have use "=" , enter each appid individually rather enter several @ once. query below shows attempt using "in", didn't work either. "incorrect syntax near keword 'in'".

any ideas? everyone!

declare @appid int declare @mgrstat int  set @appid in ('10995', '11201', '9523', '9558', '9666', '10069', '10547', '10548', '9702', '10698', '9754', '10161', '10162', '11240', '11241', '9553', '10848', '10667', '9383', '10709', '9696', '10053', '10702') set @mgrstat = 3   update [compensation].[dbo].[dev_rpt_approval] set mgr_stat = @mgrstat  [compensation].[dbo].[dev_rpt_approval]   @appid = app_id    select *   [compensation].[dbo].[dev_rpt_approval]   @appid = app_id 

this sql need:

update dev_rpt_approval set mgr_stat=3  designation in ('10995', '11201', '9523', '9558', '9666', '10069', '10547', '10548', '9702', '10698', '9754', '10161', '10162', '11240', '11241', '9553', '10848', '10667', '9383', '10709', '9696', '10053', '10702') 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -