I'm using Access 2003.
MS Access Query
Started by
jholc
, Sep 29 2006 12:41 PM
#1
Posted 29 September 2006 - 12:41 PM
I'm using Access 2003.
#2
Posted 30 September 2006 - 11:42 PM
jholc,
I have taken a guess at what your data looks like from the description you provided.
Lets assume your table is named tblLocn and the 2 fields are City and Address.
tblLocn
City, Address
Paris, Le Bigge St
London, Badger St
New York, Squirrel St
Sydney, Kangaroo St
Auckland, Kiwi St
Paris, Eiffel St
To obtain a unique list of Cities you can create a group by query on the City field.
I have shown below the SQL output of a suitable group by query.
A group by query is acheived in the query design mode by clicking the sum/total button.
The attached file has a screen shot of the query design panel from Access 97
qryCityList
SELECT tblLocn.City, Count(tblLocn.City) AS CountOfCity
FROM tblLocn
GROUP BY tblLocn.City
ORDER BY tblLocn.City;
Hope this helps
dsm
I have taken a guess at what your data looks like from the description you provided.
Lets assume your table is named tblLocn and the 2 fields are City and Address.
tblLocn
City, Address
Paris, Le Bigge St
London, Badger St
New York, Squirrel St
Sydney, Kangaroo St
Auckland, Kiwi St
Paris, Eiffel St
To obtain a unique list of Cities you can create a group by query on the City field.
I have shown below the SQL output of a suitable group by query.
A group by query is acheived in the query design mode by clicking the sum/total button.
The attached file has a screen shot of the query design panel from Access 97
qryCityList
SELECT tblLocn.City, Count(tblLocn.City) AS CountOfCity
FROM tblLocn
GROUP BY tblLocn.City
ORDER BY tblLocn.City;
Hope this helps
dsm
Attached Files
#3
Posted 02 October 2006 - 06:16 AM
This is exactly what I was looking for. Thank you for your help.
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users