SAVING { UNIQUE } {MULTI.VALUE} |
![]() ![]() ![]() |
The SAVING clause can be used in a SELECT or SSELECT command to save the content of a field in place of the record id.
Format
SAVING {UNIQUE} {MULTI.VALUE} field.name {NO.NULLS}
where
The SAVING clause changes the action of SELECT or SSELECT to save the content of a field (D or I-type) or evaluated expression into the target select list in place of the record id. It is normally used to saved fields which are ids of records in some other file.
Use of the UNIQUE keyword suppresses multiple inclusion of the same field value in the list.
For compatibility with other products, the SAVING clause normally treats value marks and subvalue marks as part of the data without applying any special meaning. Use of the MULTI.VALUE keyword causes each value or subvalue to be inserted in the list as a separate entry.
Example
SELECT INVOICES SAVING UNIQUE SITE.REF
This command creates a save list of all the site references appearing in the invoices file. The UNIQUE keyword ensures that site references only appear once regardless of the number of invoices that refer to them. |