Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kallileo
Starting Member
21 Posts |
Posted - 2008-01-09 : 02:38:45
|
| I have two identical tables in Access and I want to insert the data of second into the first table. I have as Primary Key the column "Registration Number" in both tables. So what else I have to add to the query to insert only the record that have different primary keys.INSERT INTO db1_table1SELECT *FROM db1_table2 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2008-01-09 : 02:54:43
|
| INSERT INTO db1_table1SELECT db1_table2.*FROM db1_table2left join db1_table1on db1_table2.plk = db1_table1.pkwhere db1_table1.pk is null==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
kallileo
Starting Member
21 Posts |
Posted - 2008-01-09 : 03:24:01
|
| Thank you... |
 |
|
|
|
|
|