marblegiant
New member
- Local time
- Today, 19:31
- Joined
- May 17, 2004
- Messages
- 6
Hi,
I'm building a database of people, linked to a list of organisations taken from Sage as an ODBC linked table.
To avoid radically slowing either Sage or Access, I don't keep the Sage/Access link open, but just when required - using a query to maintain a copy of the relevant fields from Sage in my Access database.
For the most part this is working fine. I'm using an append query to take any new organisations in Sage and add them to a table of organisations in Access.
But what I'm now trying to do is to use an update query to update the table in Access with any changes made to any record (such as a change of address) in the Sage. And I can't get it to work.
As far as I can see, an update query insists on a one to one link. There is (theoretically) a one to one link between the Sage organisations and the Access organisations. But unfortunately, because I can't set a primary key in the Sage table, it isn't a one to one link that Access and the query recognises. So I just get a 'Operation must use an updateable query' error.
This is the SQL that I'm using: UPDATE SALES_LEDGER
INNER JOIN ORGANISATIONS ON ORGANISATIONS.ACCOUNT_REF=SALES_LEDGER.ACCOUNT_REF
SET ORGANISATIONS.ACCOUNT_REF = SALES_LEDGER.ACCOUNT_REF, ORGANISATIONS.NAME = SALES_LEDGER.NAME;
Any help would be very much appreciated.
W
I'm building a database of people, linked to a list of organisations taken from Sage as an ODBC linked table.
To avoid radically slowing either Sage or Access, I don't keep the Sage/Access link open, but just when required - using a query to maintain a copy of the relevant fields from Sage in my Access database.
For the most part this is working fine. I'm using an append query to take any new organisations in Sage and add them to a table of organisations in Access.
But what I'm now trying to do is to use an update query to update the table in Access with any changes made to any record (such as a change of address) in the Sage. And I can't get it to work.
As far as I can see, an update query insists on a one to one link. There is (theoretically) a one to one link between the Sage organisations and the Access organisations. But unfortunately, because I can't set a primary key in the Sage table, it isn't a one to one link that Access and the query recognises. So I just get a 'Operation must use an updateable query' error.
This is the SQL that I'm using: UPDATE SALES_LEDGER
INNER JOIN ORGANISATIONS ON ORGANISATIONS.ACCOUNT_REF=SALES_LEDGER.ACCOUNT_REF
SET ORGANISATIONS.ACCOUNT_REF = SALES_LEDGER.ACCOUNT_REF, ORGANISATIONS.NAME = SALES_LEDGER.NAME;
Any help would be very much appreciated.
W