Updating date field in oracle

Which database are you using e.g with My SQL you'd have to do HI, DO THE FOLLOWING: 1.USE THIS QUERY : SELECT DUEDATE, OLDDATE FROM FACTORYORDER; 2.Hi there, just moving your post to one of the SQL forums, where the experts will be far better qualified to address your query.A link to this thread will be left in the introductions this time, however in future you can use the blue bar above to navigate through the forums Hi and Welcome to TSDN. You should have specified the error that you're getting and posted this in a relevant database forum.Specifying DEFAULT for the update value sets the value of the column to the default defined for that table.The DEFAULT literal is the only value which you can directly assign to a generated column.However, removing the open cursor with the JDBC method invalidates the positioned update.

I also think that there is no special reason why you take a string constant instead of a number constant. Use a number literal and write Because you started with string processing by inserting rows with the date represented as strings you can also make your correction using string processing.CHECK THE DATATYPE OF THIS TWO FIELDS AND THEN CHECK THE DATE FORMAT FOR THESE FIELDS. NOW USE THIS QUERY FOR UPDATE: UPDATE FACTORYORDER SET DUEDATE='30-JUL-2001' WHERE OLDDATE='06-JAN-2004'; NOTICE : ABOVE QUERY WILL UPDATE ALL THE RECORDS HAVING OLDDATE AS '06-JAN-2004'. Oracle's datetime and interval datatypes and time zone support make it possible to store consistent information about the time of events and transactions. The date format in the example includes a two-digit number for the day of the month, an abbreviation of the month name, the last two digits of the year, and a 24-hour time designation. Oracle automatically converts character values that are in the default date format into date values when they are used in date expressions.The first syntactical form, called a searched update, updates the value of one or more columns for all rows of the table for which the WHERE clause evaluates to TRUE.The second syntactical form, called a positioned update, updates one or more columns on the current row of an open, updatable cursor.

Leave a Reply