P
Paul fpvt2
What is the difference between DISTINCTROW and DISTINCT.
I read the following:
1. If every table appearing in the from clause of a query has at least one
column in the select list, DISTINCTROW does nothing, and so can be ommited.
In 99% of queries this it the case.
Question: Is the following a correct example of the above statement, where I
can ommit the DISTINCTROW ?
select DISTINCTROW tblA.colA, tblB.colB, tblC.colC FROM (tblA LEFT JOIN tblB
ON tblA.id = tblB.id) LEFT JOIN tblC ON tblA.id = tblC.id where tblA.colAA =
123
2. If a query outputs (includes in its select list) the primary key for each
table having a field appear in the select list, DISTINCTROW is equivilent to
DISTINCT.
Question: what does the above statement mean ? I use DISTINCT when I want
the result to only show those rows that have a DISTINCT value of a particular
column/field.
3. In short DISTINCTROW appears in many access queries where it does nothing,
and can usually be omitted, or replaced with DISTINCT.
Question: Does it mean that it will be safe if I convert DISTINCTROW to
DISTINCT, but, if the query is like the query in #1 above, I can just ommit
the DISTINCTROW, and does not have to replace it with DISTINCT, right ?
Thanks a lot.
I read the following:
1. If every table appearing in the from clause of a query has at least one
column in the select list, DISTINCTROW does nothing, and so can be ommited.
In 99% of queries this it the case.
Question: Is the following a correct example of the above statement, where I
can ommit the DISTINCTROW ?
select DISTINCTROW tblA.colA, tblB.colB, tblC.colC FROM (tblA LEFT JOIN tblB
ON tblA.id = tblB.id) LEFT JOIN tblC ON tblA.id = tblC.id where tblA.colAA =
123
2. If a query outputs (includes in its select list) the primary key for each
table having a field appear in the select list, DISTINCTROW is equivilent to
DISTINCT.
Question: what does the above statement mean ? I use DISTINCT when I want
the result to only show those rows that have a DISTINCT value of a particular
column/field.
3. In short DISTINCTROW appears in many access queries where it does nothing,
and can usually be omitted, or replaced with DISTINCT.
Question: Does it mean that it will be safe if I convert DISTINCTROW to
DISTINCT, but, if the query is like the query in #1 above, I can just ommit
the DISTINCTROW, and does not have to replace it with DISTINCT, right ?
Thanks a lot.