- Article Type: General
- Product: Aleph
- Product Version: 20
We have a problem (in SQL) linking z35 records to their associated z30's, z36's, etc. The problem is that the Z35-ITEM-SEQUENCE lacks leading zeroes while the Z30-ITEM-SEQUENCE and Z36-ITEM-SEQUENCE contain these zeros, for example, just "10" rather than "000010".
The following SQL can be used to build a key with a sequence number containing the necessary leading zeros:
Z35_REC_KEY || LPAD (Z35_ITEM_SEQUENCE,6,'0')
KB 16384-36721 has actual SQL showing this use of LPAD.
- Article last edited: 10/8/2013