Unique Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

By any chance do have a good explanation of what changing the Unique Record dialog box in the Query Properties Window to Yes does?

Ray
 
By any chance do have a good explanation of what changing the Unique Record dialog box in the Query Properties Window to Yes does??

Ray

It adds the DISTINCT operand to the SELECT clause in the SQL of the
query.

The effect is that it takes all of the records returned by the query;
looks at the fields *that have been selected for display*, i.e. those
named in the SELECT clause; and discards any records that duplicate
other existing records. For example if you have a Table containing any
number of fields and select three of them and get the following
records

1; "XYZ"; #3/13/2004#
2; "ABC"; #2/28/2004#
2; "ABC"; #2/28/2004#
1; "ABC"; #3/13/2004#

If you set the UNIQUE VALUES property you'll see only three records:

1; "XYZ"; #3/13/2004#
2; "ABC"; #2/28/2004#
1; "ABC"; #3/13/2004#
 
The unique records looks at the entire record of the data
source of the query, not just the fields included in the
query. It omits records where every field is the same.
Important note, it only works if you have more than one
table in your query. This is documented towards the
bottom of the F1 help.


Unique Values omits query records where every field in
the query is the same as a previous row
 
Back
Top