Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 Jun 2015 @ 14:03:57 GMT


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


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

<-- Anonymously Posted: Wednesday, June 24, 2015 09:28 -->

Sorry - that last mail wrapped around and may have been difficult to read


Hi all,

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


======

     For ODBC: Instead of 'YEAR'

     For Teradata.net: Use 'Extract year from '

        ODBC example:
        -------------

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

        Teradata.net example:
        ---------------------

           SELECT * FROM DB1.TB1   TB1

           JOIN DB2.TB2  TB2
           ON TB1.col1 = TB2.col1
           AND (EXTRACT (YEAR FROM TB1.Dte)
              =  EXTRACT (YEAR FROM TB2.Dte))

======

     For ODBC: Instead of 'CONCAT'

     For Teradata.net: Use ' || '   (for ansi - for TD !!)

======

     For ODBC: Instead of 'SUBSTRING (Text, 1, 10)'

     For Teradata.net: Use 'SUBSTR(Text, 1, 10)'
                          (or ansi 'SUBSTRING (Text FROM 1 FOR 10)'  )

        ODBC example:
        -------------

           SELECT CONCAT(SUBSTRING ( 'ABCDEF' FROM 1 FOR 2 ),
              SUBSTRING ( 'XYZ' FROM 1 FOR 2 ) )

        Teradata.net example:
        ---------------------

           SELECT SUBSTR ( 'ABCDEF', 1, 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: 23 Jun 2019