Examples
|
Description
|
SET VARIABLE vtext TEXT
|
Defines the vtext variable to have a TEXT data type.
|
SET VARIABLE vreal REAL = 100.9
|
Defines vreal variable to have a REAL data type, and assigns it the value 100.9.
|
SET VARIABLE vnumer NUMERIC (9,3)
|
Defines the vnumer variable to have a NUMERIC data type having a precision of 9 and scale of 3.
|
SET VARIABLE vnum = 14322
|
Assigns the integer value 14322 to the vnum variable.
|
SET VARIABLE VTWO =.VNUM
|
Assigns the value of the vnum variable to the vtwo variable.
|
SET VARIABLE V3 = &V4
|
Assigns the computed value of v4 to the v3 variable.
|
SET VARIABLE vltdate = ('12/25/93' + 90)
|
Assigns the value 03/25/94 to the vltdate variable.
|
SET VARIABLE vfulln = + (.VFIRSTN & .VLASTN)
|
Assigns to the vfulln variable the value of the full name formed by concatenating the values in the vfirstn and vlastn variables The ampersand inserts a space between the two values.
|
SET VARIABLE v1 = col1, v2 = col2, v3= col3 IN tbl1 WHERE col1 = 'Smith'
OR SQL compliant variation:
SELECT col1, col2, col3 INTO v1 INDI iv1, v2 INDI iv2, v3 INDI iv3 FROM tbl1 WHERE col1 = 'Smith'
See SELECT INTO
|
Assigns Smith to the variable v1; the value of column col2 to v2; and the value of column col3 in tbl1, from the row where col1 contains Smith, to variable v3.
|