Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Update statement

Author  Topic 

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2006-04-24 : 06:47:48
Would this be the correct statement, i want to set mroc = 1 if the CCOACode is in the list.

UPDATE tlb_Voy_ProductsLU
SET mroc = 1
where CCOACode in ('134','328','875','877','1891','189','Z192','Z201','Z202','Z207','Z208','Z209','Z210','Z211','Z212','Z241','Z242','Z243','Z244','Z245','Z246','Z247','Z262','420')

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-04-24 : 06:55:59
yeah its the correct statment..why you getting any errors or anything??

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-24 : 08:39:48
Yes it is correct provided that CCOACode is of varchar datatype

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -