|
Posted by Tom Moreau on 02/27/06 16:37
Could you please post sample data and expected results?
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"@sh" <spam@spam.com> wrote in message
news:dtv2c2$mhe$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
This may be a really simple question, but I always have problems with
Distinct queries.
In this instance, I have a table of Delivery addresses, some will be exactly
the same EXCEPT for the DeliveryID field, but eitherway I need the
DeliveryID so that I can pass it onto the next form.
So, I need to run a query that will find only addresses that are unique
whilst retaining the respective DID for the rows...
SELECT DISTINCT DeliveryID, Address, Organisation, Organisation, Town,
County, PostCode FROM SOL_Delivery WHERE CustomerID = 15)
How do I adjust the following to only 'Distinct' the fields other than the
DeliveryID?
Thanks!
Navigation:
[Reply to this message]
|