Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: How To (Forms, Reports, and more) > Queries/Views > Query Builder > Using the Query Builder

UNION

Scroll Prev Top Next More

A UNION can be added to queries in order to combine the results of two or more SELECT statements. When you add a UNION to the query, a tab will appear beneath the table list within the "Tables/Views In Use" panel. Additional tabs will be added for each new UNION.

 

 

QBE_UNION_tab

 

With the appropriate UNION tab selected, table(s) can be added and columns can be selected for the query.

 

 

In the RRBWY16 sample database, the "QuarterlySummary" view example utilizes three UNION statements with an initial SELECT statement. The following image represents how the UNION statements are separated in the SQL syntax panel.

 

QBE_UNION_Syntax2

 

See also:

 

SELECT ... UNION