SQL Programming Manual for TAL

NonStop SQL Version Issues
HP NonStop SQL Programming Manual for TAL527887-001
D-4
Migrating a C10 Program to Run on a C30 System
Migrating a C10 Program to Run on a C30
System
The following NonStop SQL C30 enhancements can affect migrated C10 programs.
You need to be aware of these differences to develop programs that can run in a
mixed-version environment or to migrate a C10 program to a C30 system.
Column definition
The default column definition has changed to allow null values. This change
applies to the CREATE TABLE and ALTER TABLE ADD COLUMN statements. The
C10 column defaults were SYSTEM DEFAULT and NOT NULL. The C30 column
Table D-4. Incompatible NonStop SQL Release C30 Features
C10 Program Operation Required Change
DDL statements that
create column definitions
and omit the NOT NULL
clause or the SYSTEM
DEFAULT clause.
Explicitly include the NOT NULL and SYSTEM DEFAULT
clauses in the CREATE TABLE or ALTER TABLE ADD
COLUMN statements to ensure the same column definition
produced by C10.
Programs that test for error
100 to determine if an
aggregate function (AVG,
MAX, MIN, or SUM)
returned an empty set.
Change the test for an empty set to a test for:
A NULL value (in this case, you must also supply a NULL
indicator variable).
Error 8423.
Programs that use new
C30 reserved words
INNER, JOIN, and LEFT
as column names,
constraint names,
correlation names, cursor
names, or statement
names.
Change all names that use INNER, JOIN, or LEFT.
Programs that query
catalog tables COLUMNS,
COMMENTS, and FILES.
To access Version 2 catalogs, change the queries affected by
new columns or new column information in these catalog
tables.
Static SQL programs that
access tables.
To access Version 2 tables or views that have Version 2 data
types, language compile and SQL compile to get internal
structures to handle the data.
To access Version 2 tables or views that allow null values,
add code to handle the possible null values.
Dynamic SQL programs
that initialize the SQLDA.
To access Version 2 tables or views, initialize and use the
release C30 SQLDA structure; add code to handle possible
null values.