how to update all rows of a specified data group in SQL server based on a condition? -


i have data:

i need update "isconsiderednewhire" column if there 0 in control group related it, other rows control group should zero.

after update, you'd this:

i'm having hard time figuring out how accomplished.

anyone want give me hand?

you can this:

update mytable set isconsiderednewhire = 0 controlgroupid in (select distinct controlgroupid                           mytable                          isconsiderednewhire=0) 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -