M
Member 310024
Guest
I would like to update a CHAR field with the digits (only) held within CURRENT TIMESTAMP.
However, being a person whose weakness is that they don't find it easy working with 'user friendly' objects, I haven't been able to successfully construct my UPDATE statement.
I thought it would be someting simple like this :-
UPDATE DB2TABLENAME
SET MYFIELD = SUBSTR(CURRENT TIMESTAMP,1,4)
WHERE KEYFIELD = 'XYZ';
But noooooooooo ... it's not that easy.
Can someone please put me out of my misery.
However, being a person whose weakness is that they don't find it easy working with 'user friendly' objects, I haven't been able to successfully construct my UPDATE statement.
I thought it would be someting simple like this :-
UPDATE DB2TABLENAME
SET MYFIELD = SUBSTR(CURRENT TIMESTAMP,1,4)
WHERE KEYFIELD = 'XYZ';
But noooooooooo ... it's not that easy.
Can someone please put me out of my misery.