All Forums Database
Karam 75 posts Joined 07/09
26 Mar 2012
how to get this complex TIMESTAMP output ?

 

A source table have following columns

 

POST_DATE VARCHAR(8) 

POST_TIME INTEGER

 

and these columns contains DATE and TIME values..such as

 

POST_DATE            POST_TIME

20101231              150550

20101231              132004

 

in target table , i have to club above mentioned source columns into a single TIMESTAMP column.

I have tried several ways to CAST it but with no luck.

 

Any solution would be greatly appriciated.

 

 

 

 

 

dnoeth 4628 posts Joined 11/04
26 Mar 2012

post_date || (post_time (FORMAT '999999')) (TIMESTAMP(0), FORMAT 'yyyymmddhhmiss')

Dieter

Dieter

Karam 75 posts Joined 07/09
27 Mar 2012

thank you Dieter....this works.. with my SQLs I was getting invalid timestamp error while using CAST.

You must sign in to leave a comment.