Adding a UNION to a Data Flow

How to:

Reference:

Adding a UNION to a Data Flow lets you combine the results of two select statements into a single result set.

There are some restrictions on the select statements that can be used:


Top of page

x
Procedure: How to Add a UNION to a Data Flow

From the data flow workspace:

  1. Right-click and select Add UNION.

    or

    Right-click a SQL, JOIN or UNION object, select Add, then Union.

    or

    Drag the Union object from the Insert group of the Flow tab into the workspace.

  2. A new UNION object appears in the data flow. Right-click the object, select Add, then select Union.
  3. Continue by adding objects to the select as needed.
  4. Right-click the UNION object and select Add and Select (each UNION requires two select statements).
  5. Continue by adding objects to the second select as needed.
  6. Right-click the UNION object and select Properties.
  7. The UNION Properties page opens. Select the Union type. See Union Types (below) for details.

Top of page

x
Reference: Union Types

The UNION object can be used to combine answer sets in different ways depending on the type selected in the Property page. The different UNION types are:

Object

Function

Union Object

Union

Returns a result that contains all rows from both sets with duplicate rows removed.

Union All Object

Union All

Returns a result that contains all rows from both sets including duplicates.

Except Object

Except

Returns a result set that contains all rows from the first set excluding common rows from the second set.

Except All Object

Except All

Returns a result set that contains all rows from the first set excluding common rows from the second set including duplicates.

Intersect Object

Intersect

Returns a result set that contains the common rows from two result sets.

Intersect All Object

Intersect All

Returns a result set that contains the common rows from two result sets including duplicates.


iWay Software