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-26
SQL Functions
SERIALIZABLE or whether you should adjust your error handling procedures. With
SERIALIZABLE, you can rely on the fact that when you read a row, no other
transaction can change the row while you are processing it. Thus, you are guaranteed
not to cause any integrity issues when you do update the row.
READ COMMITTED also guarantees integrity but in a different way. If you update the
row acquired using READ COMMITTED access and another transaction has updated it
since you first read it, a warning is returned to the application on the update. You can
check the warning code and take appropriate action (abort the transaction if necessary,
display an appropriate message, retry the read and update, and so on). By changing
your error handling procedures, you can benefit from the increased concurrency.
STABLE Access and EXCLUSIVE MODE
In both NonStop SQL/MX and NonStop SQL/MP, if you use STABLE access with
EXCLUSIVE MODE, you do not get an error, because the next transaction must wait
for access to the row.
SQL Functions
Most SQL/MP functions are supported in SQL/MX statements. Table 10-7 lists the
SQL/MP functions that are supported in NonStop SQL/MX and describes the syntax
differences:
Table 10-7. SQL/MX and SQL/MP Functions (page 1 of 3)
SQL/MP Functions
Implemented
in SQL/MX? Comments
AVG Yes No changes are required for NonStop SQL/MX.
CAST Yes, but
changes
might be
required to
the data-type
argument.
Some differences exist between SQL/MP and
SQL/MX data types. For more information, see:
Character Sets on page 10-34
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
CHAR_LENGTH Yes NonStop SQL/MP and NonStop SQL/MX differ
somewhat in how they handle particular types
of character strings. See Character Sets
on
page 10-34.
COMPUTE_TIMESTAMP No Remove this function from the source code.
CONVERTTIMESTAMP Yes No changes are required for NonStop SQL/MX.
For more information, see Date-Time Data
Types and Literals on page 10-35.