How do I SET a Field value to current datetimestamp in an UPDATE
751174Feb 3 2010 — edited Feb 3 2010The following is my UPDATE SQL. FIELD10 is defined as TIMESTAMP(6) and I want to update the value to the current system TIMESTAMP for each record with FIELD01 = "PENDING". I have tried several different date formats but nothing is working. What is the correct way to update FIELD10 to the current system datetimestamp.
The following does not work, what is the correct SQL script.
UPDATE DB01.TABLE1 SET FIELD10 = SYSTIMESTAMP WHERE FIELD01 = "PENDING"
So far all the variations of defining the current date and time in FIELD10 gives me the following error.
Error starting at line 1 in command:
UPDATE DB01.TABLE1
SET FIELD10=SYSTIMESTAMP
WHERE FIELD01='PENDING'
Error at Command Line:2 Column:4
Error report:
SQL Error: ORA-00904: "FIELD10": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Edited by: user12555026 on Feb 3, 2010 6:33 AM
Edited by: user12555026 on Feb 3, 2010 6:34 AM
Edited by: user12555026 on Feb 3, 2010 6:35 AM