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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -