Update SQL with Joinning a Read only view

S

Stanley

Hi there,

Here is my SQL in Access2000,

Update TableA inner join ViewA on TableA.AID = ViewA.AID
set TableA.A = ViewA.A, TableA.B = ViewA.B

My problem is that ViewA is a Read Only View that cannot be update.
Therefore, I cannot update TableA's fields with ViewA from the above SQL.

How should I write a SQL in Access 2000 to doing things like that?

Thanks in advance.
 
D

Duane Hookom

This will be slow but
Update TableA
Set A = DLookup("A","ViewA","AID=" & AID)
B=DLookup("B","ViewA","AID=" & AID);

This assumes the AID field is numeric. If not, you need to add in the
delimiters.
 

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