Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 30 Jul 2004 @ 01:52:21 GMT

  <Prev Next>  
Next> Last>>  

Subj:   ODBC functions and Teradata SQL.
From:   Hough, David A

Recently I made a post on the problems that the Teradata ODBC driver has with functions like length. I've tracked down my original incident to NCR and thought I should post the additional details here.

RECAUZR6H / DR68180 addresses the mishandling of ODBC extensions to SQL by the Teradata ODBC driver. At last report, the fixes are planned for inclusion in TTU 8.0. The ODBC extension syntax looks like:

{fn <myfunc>}

in general or

{fn length(mycol)}

in specific. The Teradata driver is not requiring the escape characters in all cases (length, left, right, and others), and allows, for example, a simple length(mycol) to pass syntax.

This causes pain for the users when they develop and test queries in ODBC (TSA/Queryman) which then fail in CLIv2 environments (BTEQ). The only mitigation available is to uncheck the TSA/Queryman option for "Allow use of ODBC SQL Extensions in queries" while testing. Invalid functions will generate errors, but the change also blocks use of stored procedures causing other headaches.

See the "ODBC 2.0 Reference Guide and SDK", Ch. 14 "Processing an SQL Statement" and Appendix F "Scalar Functions" for more information. Sorry, but I don't have the ODBC 3.0 references available.

/dave hough

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