Returns the conformity of a given SQL statement to a specified standard.
SQLFLAGGER ( sql-standard-string, sql-statement-string )
sql-standard-string The standard level against which to test compliance. Possible values are the same as for the SQL_FLAGGER_ERROR_LEVEL database option:
SQL:2003/Core Test for conformance to core SQL/2003 syntax.
SQL:2003/Package Test for conformance to full SQL/2003 syntax.
SQL:1999/Core Test for conformance to core SQL/1999 syntax.
SQL:1999/Package Test for conformance to full SQL/1999 syntax.
SQL:1992/Entry Test for conformance to entry-level SQL/1992 syntax.
SQL:1992/Intermediate Test for conformance to intermediate-level SQL/1992 syntax.
SQL:1992/Full Test for conformance to full-SQL/1992 syntax.
sql-statement-string The SQL statement to check for conformance.
The following statement shows an example of the message that is returned when a disallowed extension is found:
SELECT SQLFLAGGER( 'SQL:2003/Package', 'SELECT top 1 dummy_col FROM sys.dummy ORDER BY dummy_col' );
This statement returns the message '0AW03
Disallowed language extension detected in syntax near 'top' on line
1'
.
The following statement returns '00000' because it contains no disallowed extensions:
SELECT SQLFLAGGER( 'SQL:2003/Package', 'SELECT dummy_col FROM sys.dummy' );
“sa_ansi_standard_packages procedure”.
“SQL_FLAGGER_ERROR_LEVEL option [TSQL]” on page 489.
Chapter 5, “The SQL Preprocessor,” in the Utility Guide.
"Testing SQL compliance using the SQL Flagger"in SQL Anywhere Server – SQL Usage.