Why am I getting the following error? You tried to execute a query tht does
not include the specific expression 'NAME/ACCOUNT' as part of an aggregate
function.
Here's the SQL
SELECT Test.[NAME/ ACCOUNT], Test.ADDRESS, Test.CITY, Test.ZIP,
Test.PHONE,First( Test.DESCRIPTION), First(Test.SERIAL), First(Test.MODEL),
First(Test.[INSTALL DATE])
FROM Test
Group By [Name/Account], Description, Serial, Model
:
Well, you can't see all the data for columns C and E if they are different
and still have a distinct record based on A, B, and D. If you are willing
to accept a more or less random choice of the values for C and E you could
use an aggregate (totals) query.
SELECT A, B, First(C) as Fc, D, First(E) as Fe
FROM YourTable
GROUP BY A, B, D
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Column A, B, C, D, E
I want to do a distinct select on columns A, B and D but when i get the
results, I want to see the information for cloumns A-E.
:
I want to query the distinct values of only selected fields, but show
all
of the fields in the results.
Post some sample data to show what you mean.
--
KARL DEWEY
Build a little - Test a little
:
I have confusing question.
I have 5 fields, how would I go about running a query or 3 of the
fields,
but show all 5 in the result? I want to query the distinct values of
only
selected fields, but show all of the fields in the results.
Thanks for any assistance in advanced,
Tony