Hi following is a working codeupdate admin
set [add]= CASE WHEN uname = 'jain' THEN 1 ELSE [add] END
,[edit] = CASE WHEN uname='baiju' THEN 1 ELSE [edit] END
where uname IN ('jain', 'baiju')this statement is for updating add=1 and edit=1 for users 'jain' and 'baiju'some times i want to update add=1 for both unames.then i tried this codeupdate admin
set [add]= CASE WHEN uname = 'jain' THEN 1 ELSE [add] END
,[add] = CASE WHEN uname='baiju' THEN 1 ELSE [edit] END
where uname IN ('jain', 'baiju')but this is not possible.how to write the above code using case when. because iam using multiple unames with different fields.
RegardsBaiju