logo


57.2.5 Query Store: Command: Intersection, Union, Difference


After selecting Intersection, Union or Difference from the drop down menu or after clicking on a Intersection, Union or Difference line in the Query Display pane, you will see the Intersection, Union or Difference editor controls:

 

Query: Command: Intersection, Union, Difference: Controls

General considerations

a The controls are essentially the same but the result of the three commands is very different.

b These commands operate on Sets only. They have no effect on record selections directly.

c They are also VERY fast in operation - even for large sets they are almost instantaneous.

d We recommend that you look to these commands and the Join Set command to generate difficult to derive selections of records.

e Many times you will not need to create a selection from the Result Set straight away as the Result Set will be further manipulated to create the final Result Set. See the mini tutorial at the end of this manual. If you need to create an actual selection of records, then follow one of these commands with Use Set (Result Set). This will create a selection of records from the Result Set.

f You can choose the Result Set to be one of the original Sets being considered.

e.g.:

Assuming that the sets HospitalAll, Hospital1997, Hospital1998, Hospital1999 are all valid sets then the following will result in all the records for the 3 years in HospitalAll

Union (between Hospital1997 and HospitalAll Result Set = HospitalAll)

Union (between Hospital1998 and HospitalAll Result Set = HospitalAll)

Union (between Hospital1999 and HospitalAll Result Set = HospitalAll)

g Sets belong to particular tables. The editor will NOT allow you to make a mistake and select sets belonging to different tables. You will only ever be presented with sets in the drop down lists that make sense.

h If the Allow edit of Set Name Checkbox is set, you will be prompted for a Result Set name. You can later change the Result Set to another set if you wish.

Action of these commands

Query: Query Editor: Set Commands

Set Command

Description

Intersection

Will create a Result Set of records that is composed of the records that are common to both Set 1 and Set 2.

Union

Will create a Result Set of records that is composed of the all the records of Set 1 and Set 2.

Difference

Will create a Result Set of records that is composed of the records contained in Set 1 but NOT in Set 2.

E Button to Edit the Name of a Set

This button is described in “Query Store: E Button to edit Set Names” on page 431.



Harrowex Pty Ltd
http://www.hxmedical.com
Voice:+ 61 4 27 344 279
Fax: +61 3 52 439 019
static@hxmedical.com