|
Archives of the TeradataForumMessage Posted: Mon, 26 Feb 2007 @ 09:25:54 GMT
Hi, To change the date datatype column to timestamp column consider below mentioned table & steps: Follow the below mentioned steps : 1. Add a column of Timestamp datatype - Alter table tblname Add timestamp_column timestamp(0); 2. Update table to set the timestamp_column as follows : Update tblname From (sel pi_column,cast(date_column as timestamp(0)) as dtcol from tblname )d Set timestamp_column = d.dtcol Where tblname.pi_column = d.pi_column; 3. Drop the date_column(if you don't need that any more) Alter table tblname drop Date_column; Hope I answered your question !! Regards, RahulKumar Gadodia
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||