oracle - Update only date on datetime field on Pl/SQL -


So I need to update some dates on the Oracle database, the field is a datetime, but I only update date and time Leave it as ... The query is also such as this:

  update table SET field = to_date ('07312010', 'MMDDYY');  

But it is overriding hours, minutes and seconds from the field, I want to update the date, but I want to leave this time, any thoughts?

You can use:

  update table SET field = TO_DATE ('07312010' || '' TO_CHAR (field, 'HH 24: MI: SS'), 'MMDWYH 24: MI: SS');  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -