Tuesday, March 27, 2012

Duplicate Records

How would I indentify duplicate Records ?
Eg. Bob has qualification A and B
Steve has qualification A and C
Dan has qualification c and b
Nash has qualification A
Employees with duplicate values are Bob and Nash - how do I do this in SQL?I'm not entirely sure what you're asking. Could you rephrase, please?
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
news:F0826E94-21F6-4820-961C-242EE01C533A@.microsoft.com...
> How would I indentify duplicate Records ?
> Eg. Bob has qualification A and B
> Steve has qualification A and C
> Dan has qualification c and b
> Nash has qualification A
> Employees with duplicate values are Bob and Nash - how do I do this in
> SQL?|||Jeff:
The list below describes employees and the job qualifications:
Eg. Bob has qualification A and B
Steve has qualification A and C
Dan has qualification a
Nash has qualification A and B
I need a query to identify all those employees that have the same
qualification. Using the list above only Bob and Nash have identical
qualifications.
"Jeff A. Stucker" wrote:
> I'm not entirely sure what you're asking. Could you rephrase, please?
> --
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
> news:F0826E94-21F6-4820-961C-242EE01C533A@.microsoft.com...
> > How would I indentify duplicate Records ?
> >
> > Eg. Bob has qualification A and B
> > Steve has qualification A and C
> > Dan has qualification c and b
> > Nash has qualification A
> >
> > Employees with duplicate values are Bob and Nash - how do I do this in
> > SQL?
>
>|||It really depends on how your qualifications are stored in the database.
This probably is a SQL query question more than a reporting question, but if
you post your database structure (tables/columns related to qualifications)
we might be able to help you.
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
news:33A9C31E-E87E-476B-8FD2-F7800D2FACB1@.microsoft.com...
> Jeff:
> The list below describes employees and the job qualifications:
> Eg. Bob has qualification A and B
> Steve has qualification A and C
> Dan has qualification a
> Nash has qualification A and B
> I need a query to identify all those employees that have the same
> qualification. Using the list above only Bob and Nash have identical
> qualifications.
>
> "Jeff A. Stucker" wrote:
>> I'm not entirely sure what you're asking. Could you rephrase, please?
>> --
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
>> news:F0826E94-21F6-4820-961C-242EE01C533A@.microsoft.com...
>> > How would I indentify duplicate Records ?
>> >
>> > Eg. Bob has qualification A and B
>> > Steve has qualification A and C
>> > Dan has qualification c and b
>> > Nash has qualification A
>> >
>> > Employees with duplicate values are Bob and Nash - how do I do this in
>> > SQL?
>>|||Employee Table: Contains Employee Name, And Employee ID
Employee Qualification: Contains Employee ID, and Job ID
Job ID: Contains Job ID
Employee links to employee qualifications links to jobs
"Jeff A. Stucker" wrote:
> It really depends on how your qualifications are stored in the database.
> This probably is a SQL query question more than a reporting question, but if
> you post your database structure (tables/columns related to qualifications)
> we might be able to help you.
> --
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
> news:33A9C31E-E87E-476B-8FD2-F7800D2FACB1@.microsoft.com...
> > Jeff:
> >
> > The list below describes employees and the job qualifications:
> >
> > Eg. Bob has qualification A and B
> > Steve has qualification A and C
> > Dan has qualification a
> > Nash has qualification A and B
> >
> > I need a query to identify all those employees that have the same
> > qualification. Using the list above only Bob and Nash have identical
> > qualifications.
> >
> >
> > "Jeff A. Stucker" wrote:
> >
> >> I'm not entirely sure what you're asking. Could you rephrase, please?
> >>
> >> --
> >> '(' Jeff A. Stucker
> >> \
> >>
> >> Business Intelligence
> >> www.criadvantage.com
> >> ---
> >> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
> >> news:F0826E94-21F6-4820-961C-242EE01C533A@.microsoft.com...
> >> > How would I indentify duplicate Records ?
> >> >
> >> > Eg. Bob has qualification A and B
> >> > Steve has qualification A and C
> >> > Dan has qualification c and b
> >> > Nash has qualification A
> >> >
> >> > Employees with duplicate values are Bob and Nash - how do I do this in
> >> > SQL?
> >>
> >>
> >>
>
>|||Hmmm... This will take some thinking. My guess is that it will take a
FULL OUTER JOIN of the EmployeeQualification table to itself, and some very
judicious WHERE clause manipulation to make sure that everything matches
completely on both sides (exclude NULL values). And depending on the logic
you use, you may add a NOT EXISTS clause outside the whole thing.
I hope that gets you started, or at least considering some options...
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
news:9065B5CD-A7DB-451A-9E76-8D81849F6734@.microsoft.com...
> Employee Table: Contains Employee Name, And Employee ID
> Employee Qualification: Contains Employee ID, and Job ID
> Job ID: Contains Job ID
> Employee links to employee qualifications links to jobs
>
> "Jeff A. Stucker" wrote:
>> It really depends on how your qualifications are stored in the database.
>> This probably is a SQL query question more than a reporting question, but
>> if
>> you post your database structure (tables/columns related to
>> qualifications)
>> we might be able to help you.
>> --
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
>> news:33A9C31E-E87E-476B-8FD2-F7800D2FACB1@.microsoft.com...
>> > Jeff:
>> >
>> > The list below describes employees and the job qualifications:
>> >
>> > Eg. Bob has qualification A and B
>> > Steve has qualification A and C
>> > Dan has qualification a
>> > Nash has qualification A and B
>> >
>> > I need a query to identify all those employees that have the same
>> > qualification. Using the list above only Bob and Nash have identical
>> > qualifications.
>> >
>> >
>> > "Jeff A. Stucker" wrote:
>> >
>> >> I'm not entirely sure what you're asking. Could you rephrase, please?
>> >>
>> >> --
>> >> '(' Jeff A. Stucker
>> >> \
>> >>
>> >> Business Intelligence
>> >> www.criadvantage.com
>> >> ---
>> >> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
>> >> news:F0826E94-21F6-4820-961C-242EE01C533A@.microsoft.com...
>> >> > How would I indentify duplicate Records ?
>> >> >
>> >> > Eg. Bob has qualification A and B
>> >> > Steve has qualification A and C
>> >> > Dan has qualification c and b
>> >> > Nash has qualification A
>> >> >
>> >> > Employees with duplicate values are Bob and Nash - how do I do this
>> >> > in
>> >> > SQL?
>> >>
>> >>
>> >>
>>

No comments:

Post a Comment