Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Jan 2007 @ 10:02:57 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Casting integer as Time
 
From:   Vijay RK

Hello all,

Thanks for the replies.

Victor,

The integer column contains just the time as we read from digital clocks. For eg, if the time is 1:05 PM , it holds 130500. And 9:58 PM would be 215800.

I have pasted the DDL of target table below. Im trying to insert into the column 'Event_Start_Tm' column (now changed to Time(6), Earlier it was defined as Time (0) ) from the source table column declared as integer. But with no avail!

Target table DDL :

     CREATE SET TABLE edsdv1_work.event ,NO FALLBACK ,
        NO BEFORE JOURNAL,
        NO AFTER JOURNAL,
        CHECKSUM = DEFAULT
        (
         Event_Id DECIMAL(18,0) TITLE 'Event Id' NOT NULL,
         Event_Activity_Type_Cd VARCHAR(50) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Event Activity Type Cd' NOT NULL,
         Event_Status_Cd VARCHAR(50) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Event Status Cd' NOT NULL,
         Event_Status_Reason_Cd VARCHAR(50) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Event Status Reason Cd' NOT NULL,
         Event_Reason_Cd VARCHAR(50) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Event Reason Cd',
         Transaction_Id VARCHAR(50) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Transaction Id',
         Event_Start_Dt DATE FORMAT 'YYYY-MM-DD' TITLE 'Event Start Dt'
              NOT NULL DEFAULT DATE '1900-01-01',
         Event_Start_Tm TIME(6) TITLE 'Event Start Tm'
              NOT NULL DEFAULT TIME '00:00:00.000000',
         Event_End_Dt DATE FORMAT 'YYYY-MM-DD' TITLE 'Event End Dt'
              NOT NULL DEFAULT DATE '9999-12-31' COMPRESS (DATE '9999-12-31'),
         Event_End_Tm TIME(6) TITLE 'Event End Tm'
              NOT NULL DEFAULT TIME '23:59:59.999999',
         Account_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Account Ind',
         Financial_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Financial Ind',
         Contact_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Contact Ind',
         Incident_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Incident Ind',
         Forex_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Forex Ind',
         Account_Group_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Account Group Ind',
         Consent_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Consent Ind',
         Drug_Use_Review_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Drug Use Review Ind',
         Financial_Account_Event_Ind CHAR(3) CHARACTER SET UNICODE
              NOT CASESPECIFIC TITLE 'Financial Account Event Ind',
         Internal_Investment_Event_Ind CHAR(3) CHARACTER SET UNICODE
                NOT CASESPECIFIC TITLE 'Internal Investment Event Ind',
           External_Investment_Event_Ind CHAR(3) CHARACTER SET UNICODE
                NOT CASESPECIFIC TITLE 'External Investment Event Ind',
           Event_Effective_Dt DATE FORMAT 'YYYY-MM-DD' TITLE 'Event Effective Dt',
           EDW_Process_Id INTEGER TITLE 'EDW Process Identifier' NOT NULL,
           EDW_Source_Sys_Cd CHAR(5) CHARACTER SET UNICODE
                NOT CASESPECIFIC TITLE 'EDW Source System Code' NOT NULL,
           EDW_File_Id DECIMAL(18,0) TITLE 'EDW File Identifier' NOT NULL)
     UNIQUE PRIMARY INDEX ( Event_Id );

Regards



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016