By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & Developers. It's quick & easy.

INNER JOIN question

P: n/a
Hi,

I am real new to databases and hoping someone can help.

Main-table is a huge spreadsheet that I imported into Access
Site-table has a bunch of addresses pulled from Main-table, quite a few
overlap in some areas and none of the fields are unique except the
AddressKey which I created after pulling data from the Main-table. Why some
fields are not unique I won't get into.

what I currently have.....
UPDATE [Main-table]
INNER JOIN [Main-table].[AddressLine01]=[Sites-table].[AddressLine01]
SET [Main-table].Addressfkey = [Sites-table].[AddressKey];
I have now created a colum in the Main-table called Addressfkey which I
would like to correlate to the AddressKey in Sites-table. Since none of the
fields are unique in Sites-table, is there a way to modify the following so
that I can INNER JOIN based on more than one field? Currently I use
[Main-table].[AddressLine01]=[Sites-table].[AddressLine01] but this doesnt
get specific enough, for example , how could I work in the equivalent of
INNER JOIN [Sites-table] ON
[Main-table].[AddressLine02]=[Sites-table].[AddressLine02]
so that if two fields in the inner join matches, then it performs the SET

Or, is there a different batch of commands altogether

Thanks....Steve

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Steve,
Yes, in short. JOINS are a big subject in SQL. You can do a lot that isn't
directly supported through the QBE grid in Access. My favorite IT book
publisher, O'Reilly, publishes an SQL pocket guide that documents lots of
neat tricks and it's under $20.00. I don't work for them or get compensated
for plugging a book in any way. I just like the book and think you would
benefit from buying it.

"Steve" <1@2.com> wrote in message
news:Rl*******************@newsread3.news.atl.eart hlink.net...
Hi,

I am real new to databases and hoping someone can help.

Main-table is a huge spreadsheet that I imported into Access
Site-table has a bunch of addresses pulled from Main-table, quite a few
overlap in some areas and none of the fields are unique except the
AddressKey which I created after pulling data from the Main-table. Why
some
fields are not unique I won't get into.

what I currently have.....
UPDATE [Main-table]
INNER JOIN [Main-table].[AddressLine01]=[Sites-table].[AddressLine01]
SET [Main-table].Addressfkey = [Sites-table].[AddressKey];
I have now created a colum in the Main-table called Addressfkey which I
would like to correlate to the AddressKey in Sites-table. Since none of
the
fields are unique in Sites-table, is there a way to modify the following
so
that I can INNER JOIN based on more than one field? Currently I use
[Main-table].[AddressLine01]=[Sites-table].[AddressLine01] but this doesnt
get specific enough, for example , how could I work in the equivalent of
INNER JOIN [Sites-table] ON
[Main-table].[AddressLine02]=[Sites-table].[AddressLine02]
so that if two fields in the inner join matches, then it performs the SET

Or, is there a different batch of commands altogether

Thanks....Steve

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.