Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Sep 2012 @ 11:01:48 GMT


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


Subj:   Re: 3706: Syntax error
 
From:   McCall, Glenn David

     SELECT
     a.System_Dt  Sys_Dt,
     a.Ownership_Desc  Ownership_Desc,
     a.Actl_Utilization_Nr  Actl,
     a.Vendor_Nr  Vendor_Nr,
     FROM
     Vendor a
     WHERE
     System_Dt  IN  ( Date '2012-05-10', DATE '2012-05-09' )

You said that System_DT is a Date (presumably a Teradata Date), Teradata Dates do not have a time component. So adding a time component to the test probably wouldn't help very much.

Also that is curios syntax (I guess Teradata thinks it is curious as well - hence the error message). A better syntax for a timestamp inlist would be

     SELECT
     a.System_Dt  Sys_Dt,
     a.Ownership_Desc  Ownership_Desc,
     a.Actl_Utilization_Nr  Actl,
     a.Vendor_Nr  Vendor_Nr,
     FROM
     Vendor a
     WHERE
     System_TS  IN  ( TIMESTAMP '2012-05-10 00:00:00',TIMESTAMP '2012-05-09 00:00:00' )

Glenn Mc



     
  <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: 15 Jun 2023