R
Rose
I need to nab certain values from an Excel sheet and use them to update
multiple tables in my Access db. Someone sent me the following, helpful
looking SQL:
UPDATE
[Excel 8.0;HDR=Yes;database=C:\Temp\A.xls;].[Sheet1$]
INNER JOIN AccessTable
ON [Sheet1$].PK = AddrCent.PK
SET AccessTable.Field1= [Sheet1$].[Field1],
AccessTable.Field2= [Sheet1$].[Field2]
;
I understand most of it and how I would adapt it for each of my update
queries. I am confused about what a .pk is, though. It looks like the ON is
determining the primary key/record locator? If my primary key is in column A
of my Excel sheet, and the field is called PrimaryNum in the db, I'm missing
how the query knows to look in column A?
Or is the primary key supposed to be the first set value?
Also on the set value, what should go in the field1 spot - again, column
number?
multiple tables in my Access db. Someone sent me the following, helpful
looking SQL:
UPDATE
[Excel 8.0;HDR=Yes;database=C:\Temp\A.xls;].[Sheet1$]
INNER JOIN AccessTable
ON [Sheet1$].PK = AddrCent.PK
SET AccessTable.Field1= [Sheet1$].[Field1],
AccessTable.Field2= [Sheet1$].[Field2]
;
I understand most of it and how I would adapt it for each of my update
queries. I am confused about what a .pk is, though. It looks like the ON is
determining the primary key/record locator? If my primary key is in column A
of my Excel sheet, and the field is called PrimaryNum in the db, I'm missing
how the query knows to look in column A?
Or is the primary key supposed to be the first set value?
Also on the set value, what should go in the field1 spot - again, column
number?