distinct vs group by

  • Thread starter Thread starter annie
  • Start date Start date
A

annie

I have been designing sets of queries that work together to isolate data of
interest, but I'm wondering if I've been making them more complicated than
necessary. The first query in the set uses the Totals row with Group By
selected for a few fields. I need another query that refers to the first
query so that I can get other fields of interest aside from the ones that
had Group By selected. This works for me, but often times more than two
queries are involved and it can be a problem maintaining them.

Today it occurred to me to try another method which also worked, but it has
drawbacks that I hope I can find a way around. Rather than use Totals and
Group By, I inserted 'distinct' after the select statement in SQL View mode.
Unlike the Totals/Group By method, I can include other fields of interest in
the query. My issue is that there is no evidence of having specified the
'distinct' qualifier when I am in Design View, unless I'm just plain missing
it. As such I fear that troubleshooting problems could be complicated. Is
there an alternative way to impose the 'distinct' qualifier in Design View
and/or to know that it has been imposed without going into SQL View?

Thanks!!!
 
If you right click in the top part of the design window
and select properties, you will find what you are looking
for (unique values/unique records)
 
Back
Top