Update from multiple tables in Microsoft Access...

Thing is, Access does not behave as MS SQL Server. I had to update recently a dBaseIV database with another (don't ask...) and the easiest way I could think of was Access.
I am no SQL Guru, but I remembered that in SQL Server you could do that:
UPDATE target
SET target.column = source.column
FROM table1 target
INNER JOIN table 2 source
ON target.rel = source.rel
I think this is a MS SQL Server specific syntax though...
However, in Access, you have to do that (I did not guess, I want through hope, denial, despair and finally to microsoft and had a look at the code generated):
UPDATE target
INNER JOIN table 2 source
ON target.rel = source.rel
SET target.column = source.column
FROM table1 target
Where source column was actually written as [source]![column].
I haven't tried to see what you got if you removed the brackets.

0 TrackBacks

Listed below are links to blogs that reference this entry: Update from multiple tables in Microsoft Access....

TrackBack URL for this entry: http://www.funkydata.net/mt-tb.fcgi/1

Leave a comment

Recent Entries

Ma petite entreprise ne connait pas la crise...
Bonjour les gens,Si ça intéresse quelqu'un, ma boîte recrute. La boîte en question est une SSII en pleine croissance, qui…
"Est-ce que c'est dur de trouver un mari"
A créteil près de l'université. Une petite fille demande à sa mère/tante/grande soeur?10 sur 10…
Palm SDK and Virtual Box 3.0.6
So I wanted to upgrade my Palm SDK (was r62) and my VirtualBox (was 3.0.4) on Windows XP 32 bits.…