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

pear list installed packages
It may sound very stupid but it comes handy and it is not obvious.This lists all packages from the default…
Surviving until getfirebug is back online
The firebug site is down, so for those who had the good idea to switch to firefox 3 recently, here…
Babysitting a Macbook Pro
J'ai acheté un Macbook pro à ma petite cousine que j'adore. J'aurais pu lui acheter un autre portable, mais bon,…