All Forums Database
PajinkO 5 posts Joined 09/05
07 Mar 2006
timestamp to timestamp(0)

I want to insert data from source table to destination table.In source table some column is timestamp (2006-01-25 00:00:00.000000) and destination table is timestamp(0) (2006-01-25 00:00:00) insert into destination ( dateA )select dateBfrom sourceerror:5404 datetime field overflowI want to know how to change datatype.Thank you.

TD_Arch 35 posts Joined 07/05
08 Mar 2006

This one will work for you : insert into destination ( dateA )select cast(cast(dateB as varchar(19)) as timestamp(0))from source

PajinkO 5 posts Joined 09/05
09 Mar 2006

Thanks TD_Arch

You must sign in to leave a comment.