June 17, 2010 at 10:16 am
I have a table containing postcodes, cities and counties
I need to produce a recordset thats lists the distinct counties and all the cities
ie
West Midlands (Birmingham, Solihull, Salford, etc)
South Glamorgan (Cardiff, Newport, Cwmbran, etc)
HELP
June 17, 2010 at 10:28 am
Please read and follow the first link in my signature.
Providing ready to use table DDL, sample data, expected result and what you've tried so far is the best way to get fast answers, usually even with tested code.
Otherwise you might get something like: Please search BOL (BooksOnLine, the SQL Server help system usually installed together with SQL Server) for
SELECT GROUP BY. 😉
June 17, 2010 at 3:55 pm
If you have the Counties and Cities in the same table, you need to look at the database design. Very poor design.
You need to place the County and the City names each in a separate table.
Andrew SQLDBA
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply