All Forums Database
hamzaqk 1 post Joined 01/13
30 Jul 2014
concatenate timestamp with char

Hi ,
How come select current_date ||'abc' works and select current_timestamp||'abc' throws an error..
i believe something to do with how they are internally stored and then implicity casted.?
date is internally stored as integer, what is TS stored as?
 
thanks,

dnoeth 4628 posts Joined 11/04
31 Jul 2014

There's no automatic typecast for Timestamps, you need to cast them explicitly:

cast(current_timestamp as varchar(32))||'abc'

Dieter

You must sign in to leave a comment.