SQL Warning 5815 Function is not ANSI

Database
Win
Teradata Employee

SQL Warning 5815 Function is not ANSI

This warning was returned in BTEQ after executing the following query. Is there something missing with the syntax? Please note that the SESSION TRANSACTION was set to ANSI and SESSION SQLFLAG was set to ENTRY. Both were configured intentionally.

SELECT SALARY_AMOUNT,
CAST(SALARY_AMOUNT AS INTEGER)
FROM EMPLOYEE;

Message Returned:

 *** Query completed. 40 rows found. 2 columns returned.
*** Total elapsed time was 1 second.

FROM EMPLOYEE;
$
*** SQL Warning 5815 Function is not ANSI.

Thank you in advance for any response.

4 REPLIES
N/A

Re: SQL Warning 5815 Function is not ANSI

CAST is no SQL92 entry level:

2) The following restrictions apply for Entry SQL in addition to any Intermediate SQL restrictions:


            a) Conforming Entry SQL language shall not contain any <cast

              specification>.

Win
Teradata Employee

Re: SQL Warning 5815 Function is not ANSI

Thanks, Dieter. May I know the reference of this information? I just browsed Wikipedia and it was mentioned that CAST is included in SQL-92 ANSI standard. CAST was also mentioned to be included in SQL-92 from the reference, "ODBC Driver for Teradata User Guide" (page 98).

Link to Wikipedia:

https://en.wikipedia.org/wiki/SQL-92

N/A

Re: SQL Warning 5815 Function is not ANSI

Flagging SQL compliance was a SQL-92 feature, CAST is Standard SQL, but not in Entry Level.

A copy of SQL-92 can be found at:

http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

Win
Teradata Employee

Re: SQL Warning 5815 Function is not ANSI

Thanks, Dieter for providing to us the reference.