All Forums Teradata Applications
aniyash2006 1 post Joined 11/14
07 Nov 2014
Substring Function in Teradata Studio

SUBSTING function is giving error in Teradata Studio which was working fine in Teradata SQL Assistant.
My Query is like this : SEL SUBSTRING('ABC',1,2)
I do not want to use SUBSTR instead of SUBSTRING as it involves making changes in a lot of Queries. Please suggest a work around for this issue.
 
Thanks!
Anirudh

dnoeth 4628 posts Joined 11/04
07 Nov 2014

Hi Anirudh,
there's probably no workaround, SUBSTRING('ABC',1,2) is a ODBC SQL extension, which is automatically replaced by the ODBC driver with valid syntax if Disable Parsing in the ODBC driver's options is not set.
 
Studio uses a JDBC conection where this is not available, so you must replace it with either SUBSTRING('ABC' FROM 1 FOR 2) or SUBSTR('ABC',1,2)

Dieter

You must sign in to leave a comment.