updating table

G

Guest

I am usingtwo tables
table1 tracks companies and there company codes. PK is company code
table2 tracks the companies transactions. PK is autonumber
when I run

SELECT Data.Symbol, Data.[Company Name], Data.Last, Data.Volume, Data.[Rel
Str], Data.Date
FROM Data LEFT JOIN Symbols ON Data.[Company Name] = Symbols.[Company Name]
WHERE (((Symbols.[Company Name]) Is Null));

I get 143 records how ever when I try to update or append I don't get that
number.
I think it is because I have multiple company codes table2 so if AA isn't in
table1 and it is in table2 4 times then it is trying to pull over more info
than it needs.

So can someone help?
Thanks,
RogueIT
 
M

Michel Walsh

Hi,


Indeed, if both tables have duplicated values, for a given match

Data.[Company Name] = Symbols.[Company Name]

say for company name = "Microsoft", there is n records in Data and m
records in Symbols, then the SELECT will generate n times m records, for
that company name value.

To stop that "explosion", you have to be sure that one of the table has NO
DUPLICATED values.



Hoping it may help,
Vanderghast, Access MVP
 

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

Top