Todd Penland
asked on
Help Needed With Query
I need help with one more Query and then I'm done. For this one, I need to update the SinceLastAssigned value for every participant who has a value of zero to the MAX value in that column, plus one (in the case of the data presented, that would be 176). Please let me know if you have any questions. Appreciate the help!
Is 176 the value for all rows having a zero?
ASKER
Yes, that's correct. I'm assuming that this can be done in one query but the first part (of course) has to be identifying the maximum value in the since last assigned column, then updating all the rows where the value is 0 to that maximum value plus one. Hope that helps.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
I agree with Qlemo,
You can Update
I agree with Qlemo,
You can Update
Update Tbl set sinceLastAssigned = (SELECT max(sinceLastAssigned) from Tbl) +1
WHERE sinceLastAssigned = 0
ASKER
Thank you very much, this was exactly what I needed!