58.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:
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.
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.
E Button to Edit the Name of a Set
This button is described in Query Store: E Button to edit Set Names on page 445.
|