Distinct versus DistinctRow

  • Thread starter Thread starter Razor
  • Start date Start date
R

Razor

Hi,

What is the exact difference between Distinct and
DistinctRow?

Secondly, if I wanted to return distincts on just one
field, must the field name appear immediately after the
words "SELECT DISTINCT"? Can I somehow tell Access to
return distincts on a certain field, without having to
care about its position in the Select clause?

How would I select distincts based on two or more fields?
or the entire row?

Thanks a lot for your help!

Razor
 
I got this off of Google from an anonymous 1995 post:

distinct involves duplication of the fields that you use in your select
statement, while distictrow involves duplication of actual records.
So, if you had two records as follows:

name addr zip phone

joe w. 438 20855 9361212
joe w. 437 20855 8442525


the statement

SELECT DISTINCT name, zip from table... WHERER name=joe w. and zip = 20855

would display only

joe w. 20855


while using select DISTINCTROW would display

joe w. 20855
joe w. 20855

because there are actually two records with the same name, zip data. (the
fields you selected to show). But disitnct will only diplay one line
because of the fields you selected to display, only one occurence of
joe w. 20855 will come out.
 
Back
Top