Hi Joanna,
Just Concatenate the DATE and Time values ( varchars or chars ) and use
the timestamp_format
Er:
Insert into table ( ts )
Values
( timestamp_format ( '2008-03-25 10:30:20' , 'YYYY-MM-DD HH24:MI:SS' )
);
(where column ts is of type timestamp )
-----Original Message-----
From: Joanna Grossman
[mailto:db2udbdba-ezmlmshield-x19497095.[Email address protected]
Sent: Tuesday, March 25, 2008 10:11 AM
To: LazyDBA Discussion
Subject: TIMESTAMP_ISO
Okay, here's a follow-up to my last question. I've got a TIME field and
a DATE field in my raw data. I'd like to derive a TIMESTAMP field upon
INSERT from these two fields. This seems like it should be obvious, but
I can't figure the syntax. It should be something like:
INSERT INTO TABLE
(TIME, DATE, TIMESTAMP)
VALUES
(TIME('01.00.00'), date('2006-05-06'), TIMESTAMP_ISO(DATE,TIME) );
but that's not it. And the documentation says it will only take one of
the other, but there's not much point in a timestamp unless it can
accept both time and date, right?
TIA
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page