AddUnion method: QuerySelect collection

Syntax

AddUnion()

Description

The AddUnion method adds a new QuerySelect object of type Union in the current QuerySelect collection. You can use AddUnion only with the first QuerySelect Collection because PeopleSoft Query doesn’t' support Unions for subqueries. All unions are considered children of the Main Select.

Parameters

None.

Returns

A reference to a QuerySelect object if successful. If the current QuerySelect Collection does not belong to the first Select statement, it returns NULL. If it fails, it returns NULL.

Example

&QryMainSel = &Query.QuerySelect; 
&QryMainSelCol = &QryMainSel.QuerySelects; 
&QryUnion = &QryMainSelCol.AddUnion();