I have a database with a 'date' data type where some of the fields are 0000-00-00.
I need to run a SQL command that will find all date that are 0000-00-00 and replace with a date that is in another field.
The column name with some instances of 0000-00-00 is date_finished
The column name with the value to replace this is duedate
I am kind of there
update mytable set date_finished = replace(date_finished,'0000-00-00','*duedate column*');
How do I specify to replace the date_finished 0000-00-00 with the duedate field in each row?
Thanks
I need to run a SQL command that will find all date that are 0000-00-00 and replace with a date that is in another field.
The column name with some instances of 0000-00-00 is date_finished
The column name with the value to replace this is duedate
I am kind of there
update mytable set date_finished = replace(date_finished,'0000-00-00','*duedate column*');
How do I specify to replace the date_finished 0000-00-00 with the duedate field in each row?
Thanks