Substring Function in Teradata Studio

Teradata Applications

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

1 REPLY
N/A

Re: Substring Function in Teradata Studio

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)