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 |
|
wided
Posting Yak Master
218 Posts |
Posted - 2011-04-12 : 10:59:46
|
| i want to import a data from access or an other databasei i imoprt all recors ; it is okbut i want to import sum records (with selection), how to write a query (the syntax)thanks |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2011-04-12 : 11:02:13
|
| Give us more information if you want help. Please post data structures and required result set. |
 |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2011-04-12 : 11:19:29
|
| Table in access look like thisexempletable1col1 col21 A2 B3 Cfor the first time I import whole tableif other records are added to table "table1"table1col1 col21 A2 B3 C4 DI would like to import only the records that are not yet imported(only 4 D) |
 |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2011-04-12 : 11:48:35
|
| I need the syntax of the query in the wizard to import data |
 |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2011-04-12 : 13:08:07
|
| I wait I'll join tomorrowthanksps: I am from TUNISIA |
 |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2011-04-13 : 04:31:28
|
| good morning |
 |
|
|
kanagarajnm
Starting Member
2 Posts |
Posted - 2011-04-13 : 05:54:59
|
| You can use the following query to INSERT only the records that are not available in table2.INSERT INTO table2 SELECT col1,col2 FROM table1 WHERE NOT EXISTS(SELECT 1 FROM table2 WHERE table2.col1=table1.col1) |
 |
|
|
|
|
|