newtosql0001
Technical User
I need to update one field in a table, there are multpible instances of my criteria however, I only want one field updated and the rest to be skipped.
update CLAIMS set field1 = 'ready' WHERE attorney = 'Doe'
I can use the following query to find the cases that need to be updated
select distinct
caseid
from CLAIMS
WHERE attorney = 'Doe'
the problems arises because an attorney "Doe" may appear in a case once, or maybe 50 times and I don't want "ready" to appear in all 50 claims, just one.
would i bring my distinct query into a new table, make the update and then bring that table back in?
update CLAIMS set field1 = 'ready' WHERE attorney = 'Doe'
I can use the following query to find the cases that need to be updated
select distinct
caseid
from CLAIMS
WHERE attorney = 'Doe'
the problems arises because an attorney "Doe" may appear in a case once, or maybe 50 times and I don't want "ready" to appear in all 50 claims, just one.
would i bring my distinct query into a new table, make the update and then bring that table back in?