UPDATES and INSERTS from one table to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hallo Everyone

I am trying to insert and update information from one table to another. In Oracle the following works, does anyone know how I can do this in Access 2000

Nigel..

UPDATE table1 t_alias1
SET column =
(SELECT expr
FROM table2 t_alias2
WHERE t_alias1.column = t_alias2.column);

INSERT INTO Sync_Table1 (
Table1_ID(Content, Last_Edited, UniqueStr, Del
) VALUES
SELECT Table1_ID ,Content ,Last_Edited ,UniqueStr ,Del
FROM Sync_Table2 S WHERE NOT S.UniqueStr IN (Select UniqueStr From Sync_Table1
 
Hi,


UPDATE Table1 RIGHT JOIN Table2 ON Table1.ID = Table2.ID
SET Table1.ID=Table2.ID,
Table1.field1 = Table2.Field1,
Table1.field2 = Table2.Field2,
...




That works only with Jet. Table1 is the old table to be updated, table2 is
the table with updated data (and new data). After having run the query, you
have new values updated and new lines inserted.


Hoping it may help,
Vanderghast, Access MVP



Nigel Findlater said:
Hallo Everyone,

I am trying to insert and update information from one table to another. In
Oracle the following works, does anyone know how I can do this in Access
2000?
 
Back
Top