Re: Simple SQL Distinct...!?



I totally agree and by offering them the latest address that matches the
address to which they're sending, a new one wouldn't be inserted, I'd pass
that DID (DeliveryID) on for use with order.

Is there a way to get the DID into the query too?

Cheers, Ash


<markc600@xxxxxxxxxxx> wrote in message
news:1141055631.655033.148880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

As David has already mentioned, you would be
better off fixing this to prevent duplicates
appearing in the first place. Picking the
latest address using the highest DeliveryID
will probably work (assuming this is an identity),
but you are filling your table with redundant
data - not good in the long term.



.