distinct_list

Generates a distinct list based on the values of a specified field.

Syntax

void distinct_list(list-name,col)
list              list-name
int               col

Description

Returns a list with a single column of distinct values.

list-name

identifies the name of the list that contains the field to be made distinct.

col

identifies the sequence number of the field to be made distinct.

This function sorts the list on the specified field to group the rows with duplicate values and then deletes the duplicate rows.

Example

distinct_list() can be used in a window query trigger to make a distinct list based on the values of a specified field.

 {
 ...
 query(query_max,G.query_buf);        /* execute the query              */
 distinct_list(p.wl,@p.an);           /* p.an is a field name           */
 ...
 }


Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999