Basic Select Query Duplicating a single end user's records

G

Guitarzann

I am stumped with a particular problem. My table consists of hundreds of
records that are directed to their associated end user. This is my simple
Select query shown here:
"SELECT [Name Tbl].Mgr, [Name Tbl].Name, [Data Tbl].Survey_CNT,
FROM Manager INNER JOIN ([Name Tbl] INNER JOIN [Data Tbl] ON [Name Tbl].ID#
= [Data Tbl].Name) ON Manager.OM = [Name Tbl].Mgr"

Inside the Data Tbl, one Name shows 4 physical records. However, in this
simple query it has duplicated one Name's records so now there is 8 for that
one particular name.

The other Names show a correct matching count of records between the Data
Tbl and the query. What could be the cause of why this query is duplicating
just one Name's data? What baffles me is there are no mathematical processes
in the query; just a simple SELECT query.

Thanks
 
D

Daryl S

Guitarzann -

Are there two managers associated with that table? That would double the
records returned for that table.
 
J

J_Goddard via AccessMonster.com

Hi -

The number of expected records is doubled because one of your joins is in
fact a many-to-many instead of the expected one to many; in other words, one
of the tables contains a duplicate record when it shouldn't.

From what you have described, I would look for an unwanted duplicate [Name
Tbl].ID# in the [Name Tbl], or duplicate Manager.OM values in the Manager
table.

HTH

John


I am stumped with a particular problem. My table consists of hundreds of
records that are directed to their associated end user. This is my simple
Select query shown here:
"SELECT [Name Tbl].Mgr, [Name Tbl].Name, [Data Tbl].Survey_CNT,
FROM Manager INNER JOIN ([Name Tbl] INNER JOIN [Data Tbl] ON [Name Tbl].ID#
= [Data Tbl].Name) ON Manager.OM = [Name Tbl].Mgr"

Inside the Data Tbl, one Name shows 4 physical records. However, in this
simple query it has duplicated one Name's records so now there is 8 for that
one particular name.

The other Names show a correct matching count of records between the Data
Tbl and the query. What could be the cause of why this query is duplicating
just one Name's data? What baffles me is there are no mathematical processes
in the query; just a simple SELECT query.

Thanks
 
G

Guitarzann

Thanks Daryl, I discovered a "Duh" on my part. It was not a duplicate
Manager. It turned out to be another Name with a slight variation of the
spelling of their name. The Name Tbl needed to be modified to distinguished
the two. My eyes missed the single letter.

My apologies for missing that one! :(

Daryl S said:
Guitarzann -

Are there two managers associated with that table? That would double the
records returned for that table.

--
Daryl S


Guitarzann said:
I am stumped with a particular problem. My table consists of hundreds of
records that are directed to their associated end user. This is my simple
Select query shown here:
"SELECT [Name Tbl].Mgr, [Name Tbl].Name, [Data Tbl].Survey_CNT,
FROM Manager INNER JOIN ([Name Tbl] INNER JOIN [Data Tbl] ON [Name Tbl].ID#
= [Data Tbl].Name) ON Manager.OM = [Name Tbl].Mgr"

Inside the Data Tbl, one Name shows 4 physical records. However, in this
simple query it has duplicated one Name's records so now there is 8 for that
one particular name.

The other Names show a correct matching count of records between the Data
Tbl and the query. What could be the cause of why this query is duplicating
just one Name's data? What baffles me is there are no mathematical processes
in the query; just a simple SELECT query.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Ranking Query Results 4
query too slow 1
Issues with Left Join 2
Find suspected duplicates 2
Show All Dates 1
query to add a column to a tbl 0
Subtract forecasted usage & return a date? 3
Finding Missing Text v2 1

Top