Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
176 Chapter 10
Technical Articles
New Features in ALLBASE/SQL Version G3
Syntax.
[ TRIM ({ LEADING | TRAILING | BOTH} (,
charset
,
stringexpr
)]
Examples:
Example 1
SELECT LOWER (OWNER) || '.' || LOWER (NAME)
FROM SYSTEM.TABLE
WHERE NAME = UPPER ('vendors');
Returns "purchdb .vendors "
Example 2
SELECT POSITION ('world', 'hello world')
FROM SYSTEM.TABLE
WHERE NAME = UPPER('vendors');
Returns the numeric value 7
Example 3
SELECT INSTR ('hello world hello world', 'world', 5, 2)
FROM SYSTEM.TABLE
WHERE NAME = UPPER('vendors');
Returns the numeric value 18 (starting position of the second
occurrence of the string 'world')
Example 4
SELECT * FROM SYSTEM.TABLE
WHERE NAME = LTRIM ('?*', 'VENDORS?*???***')
AND OWNER = 'PURCHDB';
Returns the system table entry for PURCHDB.VENDORS
Example 5
SELECT TRIM (BOTH '?*' FROM '??**?*hello ?* world???*')
FROM SYSTEM.TABLE
WHERE NAME = 'VENDORS';
Returns 'hello?* world'.
Features in ALLBASE/SQL Version G2
ALLBASE/SQL, version G2, contains several major enhancements
providing significant benefits in the following areas:
• Security
• Year 2000 compatibility
• CAST function (introduced in G1.15)
In addition, the following manuals were updated to fully document G1
and G2 features:
• ALLBASE/SQL Reference Manual