SQL/MP Version Management Guide
Compaq NonStop™ SQL/MP Version Management Guide—429833-001
7-1
7
Version Compatibility for SQL
Programs
When to Modify and Recompile Programs
If your existing programs were developed on a C-series operating system, you should be
aware of changes introduced in the D-series release of SQL. For information on the
changes introduced with the D-series release, see the D-Series System Migration
Planning Guide and the Guardian Application Conversion Guide.
This subsection describes some of the errors that can occur when you are compiling or
executing programs developed on a C-Series operating system on a node running a
D-series release.
SQL Statements That Cause Version Errors
An attempt to compile or execute a version 1 or version 2 program on a node running
version 300 or newer SQL software can fail if the program’s source code contains:
•
Data Definition Language (DDL) statements that create tables with the name
CPRULES or CPRLSRCE. These table names are used for new tables in version
300 and newer catalogs. If you attempt to create a table with either of these names
on the same volume and subvolume as a catalog, SQL returns an error stating that
the table cannot be created.
•
Data Manipulation Language (DML) statements that use an asterisk (*) to specify
all columns in a table or view. An asterisk enables access to version 300 and newer
columns that did not exist in version 2. Such statements cause SQL execution to fail.
An attempt to compile or execute a version 1 program on a node running version 300 or
newer NonStop SQL/MP software can fail if the program’s source code contains:
•
The DDL or DML statements described previously.
•
DDL or DML statements that use the reserved words JOIN, LEFT, or INNER as
names of constraints, columns, correlations, cursors, or statements. You can use
these reserved words only as names of host variables.
•
DDL statements CREATE TABLE or ALTER TABLE ADD COLUMN that do not
explicitly define a column with NOT NULL. Support for null values was added in
version 2, changing the default values for version 1 columns. Such statements can
cause run-time failure if a null value is returned.
•
DML statements that contain aggregate functions: AVG, MIN, MAX, or SUM.
Starting with version 2, these functions return a null value rather than an error for an
empty set. Such statements can cause run-time failure if a null value is returned. The
version 1 aggregate function COUNT operates consistently with version 300.