All Forums Database
Win 28 posts Joined 03/13
24 Aug 2015
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.


Message Returned:

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

 *** SQL Warning 5815 Function is not ANSI.

Thank you in advance for any response.

dnoeth 4628 posts Joined 11/04
26 Aug 2015

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



Win 28 posts Joined 03/13
07 Sep 2015

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:

dnoeth 4628 posts Joined 11/04
08 Sep 2015

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:


Win 28 posts Joined 03/13
16 Sep 2015

Thanks, Dieter for providing to us the reference.

You must sign in to leave a comment.