SQL Supplement for H-Series RVUs
SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs—529446-005
1-49
Running the SQL Compiler
Dynamic SQL statements are not compiled during explicit SQL compilation. Errors in
these statements are returned at run time after dynamic compilation by a PREPARE or
EXECUTE IMMEDIATE statement.
Warning Conditions
A warning condition usually occurs when the SQL compiler has insufficient information
available. If a warning occurs, the SQL compiler still records the program file in the
catalog, validates the file for execution, and then returns a warning message.
In these two situations, the SQL compiler issues a warning message but still compiles
the statement:
•
Compiler assumption. The SQL compiler made an assumption necessary to
complete the compilation. For example, if the number of columns in the SELECT
statement does not match the number of host variables, the compiler returns a
warning message and assumes that you do not want to use either the extra
columns or the extra host variables.
•
Unavailable statistics. The SQL compiler does not have the necessary statistics for
a table or view to optimize an execution plan. The compiler then uses statistics in
the catalog to determine an optimized execution plan.
In other situations, the SQL compiler marks the statement as having insufficient
information to compile and does not record dependencies in the USAGES catalog
tables for the affected statement. The SQL executor then tries to resolve the problem
at run time by automatically recompiling the statement.
At run time, the uncompiled statement causes an error in these cases:
•
Insufficient information. The SQL compiler does not have enough information to
determine the validity of a statement. For example, an SQL statement refers to an
unavailable table. The table might not exist, or it might reside on an unavailable
remote node. (This situation always occurs for a program that both creates and
refers to a table. The table, of course, does not exist when the program is explicitly
SQL compiled.)
•
Unresolved DEFINEs. An SQL statement references a nonexistent DEFINE.










