sql - Update query needed based on the condition -
i need stored procedure update error message column on table based on condition, if dob null or greater current date error message column should updated 'invalid dob' , based on id has updated, if dob lesser current date , not null, error message column should not updated. need update statement query, tried update columns without checking condition. please provide solution query,thank you.
strange requirement simple.
update sometable set errormessage = 'invalid dob' dob null or dob > getdate()
Comments
Post a Comment