Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 Jun 2015 @ 12:51:47 GMT


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


Subj:   odbc sql extensions vs teradata sql extensions
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, June 24, 2015 08:31 -->

Hi all,

Would anyone have or know where I might get a list of ODBC SQL Extensions vs Teradata SQL Extensions i.e.

     ODBC                                                   Teradata.net
     ----                                                   ------------

     Instead of 'YEAR'                                      Use 'Extract year from '

     example
     SELECT * FROM DB1.TB1   TB1                            SELECT * FROM DB1.TB1   TB1
     JOIN DB2.TB2       TB2                                 JOIN DB2.TB2 TB2
     ON TB1.col1 = TB2.col1                                 ON TB1.col1 = TB2.col1
     AND YEAR (TB1.Dte) = YEAR (TB2.Dte)                    AND (EXTRACT (YEAR FROM TB1.Dte)
                                                                  =  EXTRACT (YEAR FROM TB2.Dte))


     Instead of 'CONCAT'                                    Use ' || '   (for ansi - for TD !!)


     Instead of 'SUBSTRING (Text, 1, 10)'                   Use 'SUBSTR(Text, 1, 10)'
                                                               (or ansi 'SUBSTRING (Text FROM 1 FOR 10)'  ) example
     SELECT CONCAT(SUBSTRING ( 'ABCDEF' FROM 1 FOR 2 ),     SELECT SUBSTR ( 'ABCDEF', 1, 2 ) ||
           SUBSTRING ( 'XYZ' FROM 1 FOR 2 ) )                  SUBSTR ( 'XYZ', 1, 2 ) ;

Its to help users move from using ODBC to using Teradata.net


Thanks in advance



     
  <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