Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I SET a Field value to current datetimestamp in an UPDATE

751174Feb 3 2010 — edited Feb 3 2010
The 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 3 2010
Added on Feb 3 2010
5 comments
1,375 views