Hi Peter,
LENGHT is an ODBC function like LTRIM, RTRIM, MONTH which is replaced by the ODBC parser with some valid Teradata SQL, IMHO it should not be used at all due to the problems you encouter.
It's working in SQLA when you switch off "Diasble Parsing" in the OBDC driver options, in older releases this behaviour could be controlled by an SQLA option on the query tab "Allow use of ODBC SQL extensions in queries".
But, when you switch it on your query will fail when you run it using any other connection (JDBC, .NET, CLI) or when you try to use it in a CREATE TABLE AS or CREATE VIEW (the parser only replaces it for DML).
In TD14 there's a built-in LENGTH function, in TD13.10 i would suggest to create it as a SQL UDF.
Dieter
Hi Peter,
LENGHT is an ODBC function like LTRIM, RTRIM, MONTH which is replaced by the ODBC parser with some valid Teradata SQL, IMHO it should not be used at all due to the problems you encouter.
It's working in SQLA when you switch off "Diasble Parsing" in the OBDC driver options, in older releases this behaviour could be controlled by an SQLA option on the query tab "Allow use of ODBC SQL extensions in queries".
But, when you switch it on your query will fail when you run it using any other connection (JDBC, .NET, CLI) or when you try to use it in a CREATE TABLE AS or CREATE VIEW (the parser only replaces it for DML).
In TD14 there's a built-in LENGTH function, in TD13.10 i would suggest to create it as a SQL UDF.
Dieter