10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ExpressionsThe general syntax for hexadecimal constants is:X'n{n}'where n represents two hexadecimal digits. For example, using the ASCIIcharacter set, the following command inserts the string “XYZ” followed by thecarriage return character into col1 and a numeric into col2 of table1:insert into table1 (col1, col2)values (X'58595A0D', 500);OpenROAD interprets the hexadecimal constants as follows:• 58 = X• 59 = Y• 5A = Z• 0D = carriage returnIf you select the inserted row from table1 with the following code fragment,“XYZ” is displayed in col1:select :col1 = col1 from table1where col2 = 500;Null ConstantA null constant is represented by the special keyword null. You use thiskeyword to assign a null to a nullable variable or database column. Forexample, the following statement assigns a null to the variable amount:amount = null;For more information about nulls, see Nulls (see page 35).Named ConstantsA named constant is a literal value to which you give a name. You can thenuse the name in place of the constant in any 4GL expression. You specify thevalue for the named constant when you create it with the OpenROADWorkbench. This constant is global to the application.You must use the Constant Editor to change the value of a constant. Althoughyou can reference the named constant in your 4GL code, you cannot change itsvalue at runtime.38 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!