Re: DISTINCT
From: J (anonymous_at_discussions.microsoft.com)
Date: 05/27/04
- Next message: Aaron Bertrand - MVP: "Re: DISTINCT"
- Previous message: Ben Hunsberger: "Re: Slow Union Query in function"
- In reply to: Aaron Bertrand - MVP: "Re: DISTINCT"
- Next in thread: Aaron Bertrand - MVP: "Re: DISTINCT"
- Reply: Aaron Bertrand - MVP: "Re: DISTINCT"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 13:40:12 -0700
It doesn't matter which one I get as long as I don't get
the same person twice, my requirements have actually
changed and I will going back to get the other information
later. I'm performing data migration from this source
system over to an enterprise oriented database.
>-----Original Message-----
>> The problem I was having before was not having the
ability
>> to select distinct on a couple of columns as well as
>> returning the rest of the related columns without the
>> distinct used on them. So I just concatenated a few
>> columns together within the distinct clause and left
>> everything else outside of it.
>
>This is an inelegant and non-relational solution at best,
and will probably
>perform terribly as well. Let's ask my first question
again.
>
> If you have two rows:
>
>APP_NO FirstName LastName Sin Birthdate
>5 Bob Jones 111-11-1111 19740201
>12 Bob Jones 111-11-1111 19740201
>
>Which row do you want?
>
>--
>Aaron Bertrand
>SQL Server MVP
>http://www.aspfaq.com/
>
>
>.
>
- Next message: Aaron Bertrand - MVP: "Re: DISTINCT"
- Previous message: Ben Hunsberger: "Re: Slow Union Query in function"
- In reply to: Aaron Bertrand - MVP: "Re: DISTINCT"
- Next in thread: Aaron Bertrand - MVP: "Re: DISTINCT"
- Reply: Aaron Bertrand - MVP: "Re: DISTINCT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|