Home Forums SQL Server 2008 SQL Server 2008 - General Check each cell in one table and update another table RE: Check each cell in one table and update another table
ripal_patel0
SSC Rookie
Points: 47
More actions
May 17, 2013 at 6:08 am
#1616133
Below is a query for your requirment,
UPDATE ISCOLOR
SET ISCOLOR = CASE when COLOR.Blue IS NOT NULL OR COLOR.Red IS NOT NULL or COLOR.Yellow IS NOT NULL then 'Yes' else 'NO' END
FROM ISCOLOR INNER JOIN COLOR ON ISCOLOR.ID = COLOR.ID