![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
Steve wrote: 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 UPDATE [Main-table] As M INNER JOIN [Sites-table] AS S ON M.[AddressLine01] = S.[AddressLine01] AND M.[AddressLine02] = S.[AddressLine02] SET M.Addressfkey = S.[AddressKey] -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBQh99AYechKqOuFEgEQIonQCgoVlbVRedYLZpGqTqQgwiO4 qPS+QAnAi0 PXQsS3VvKeWPJUAJ4oKBqaV5 =FQUN -----END PGP SIGNATURE----- |
![]() |
| Thread Tools | |
| Display Modes | |
| |