thebatfink
Registered User.
- Local time
- Today, 11:17
- Joined
- Oct 2, 2008
- Messages
- 33
Hi,
I have a select query..
which works fine and returns the results I want.. But I now want to make that into an UPDATE query which updates the selected records. I have tried this but it gives an error..
Could anyone explain what the correct syntax should be? I'm assuming I haven't wrote it correctly, but from what I can find 'googling' it looks like it should to me!
Thanks!
I have a select query..
Code:
SELECT [table1].[field1], [table1].[field2]
FROM [table1]
LEFT JOIN [table2]
ON [table1].[field3]=[table2].[field1]
WHERE [table2].[field2] = true and [table2].[field3] = false;
which works fine and returns the results I want.. But I now want to make that into an UPDATE query which updates the selected records. I have tried this but it gives an error..
Code:
UPDATE [table1]
SET [table1].[field1] = 'N/A', [table1].[field2] = 'N/A'
FROM [table1]
LEFT JOIN [table2]
ON [table1].[field3]=[table2].[field1]
WHERE [table2].[field2] = true and [table2].[field3] = false;
Could anyone explain what the correct syntax should be? I'm assuming I haven't wrote it correctly, but from what I can find 'googling' it looks like it should to me!
Thanks!