SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Converting SQL/MP Applications to SQL/MX
Applications
HP NonStop SQL/MX Database and Application Migration Guide540435-005
10-16
Modifying the Source Code
Modifying the Source Code
To convert an SQL/MP application to NonStop SQL/MX, first identify the source file of
the application and then modify the source code so that it complies with SQL/MX
syntax. To determine what changes are required in the source code, see:
Changes to SQL Syntax on page 10-16
Changes to Embedded SQL Constructs on page 10-41 (embedded SQL only)
If you are converting an SQLCI script to MXCI, see also Converting SQLCI Scripts to
NonStop SQL/MX on page 10-8.
Changes to SQL Syntax
To convert SQL/MP applications to SQL/MX applications, you must change the SQL
syntax so that it complies with NonStop SQL/MX. You cannot have SQL/MP and
SQL/MX syntax in the same SQL/MX application. However, you can use SQL/MX DML
statements to access SQL/MP database objects, and the same SQL/MX statement can
query both SQL/MP and SQL/MX database objects.
These subsections describe the differences between SQL/MP and SQL/MX syntax and
the changes that are required for compliance with NonStop SQL/MX:
Data Control Language (DCL) Statements on page 10-17
Transaction Control Statements on page 10-19
Data Manipulation Language (DML) Statements on page 10-21
Access Options and Isolation Levels on page 10-24
SQL Functions on page 10-26
Predicates on page 10-28
Database Object References on page 10-31
Reserved Words on page 10-32
String Literal Delimiters on page 10-33
Character Sets on page 10-34
Collations on page 10-35
Date-Time Data Types and Literals on page 10-35
Interval Data Types and Literals on page 10-38
Floating-Point Data Types on page 10-40
Data Security Language (DSL) Statements on page 10-40
Data Definition Language (DDL) Statements on page 10-41