Click here to Skip to main content
15,912,329 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql query Pin
kadkir7-Jan-09 19:17
kadkir7-Jan-09 19:17 
GeneralRe: sql query Pin
Wendelius7-Jan-09 19:41
mentorWendelius7-Jan-09 19:41 
QuestionImport Data From Other Database and Eliminate Duplicates Pin
polishprogrammer5-Jan-09 9:59
polishprogrammer5-Jan-09 9:59 
AnswerRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius5-Jan-09 10:25
mentorWendelius5-Jan-09 10:25 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
polishprogrammer5-Jan-09 10:38
polishprogrammer5-Jan-09 10:38 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius5-Jan-09 10:58
mentorWendelius5-Jan-09 10:58 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
polishprogrammer7-Jan-09 9:47
polishprogrammer7-Jan-09 9:47 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius7-Jan-09 10:00
mentorWendelius7-Jan-09 10:00 
Aah, they've added external sources to Access. Starts to look like SQL Server.

Anyway, I don't know how you identify a duplicate, but let's say you have a column named ID and based on that you make the decision if it exists or not. In that case you could have for example:
INSERT INTO Employees
SELECT source.*
FROM [;DATABASE=C:\Program Files\Northwind.mdb;PWD=none].Employees source
WHERE NOT EXISTS (SELECT 1
                  FROM   Employees target
                  WHERE  target.ID = source.ID)

or even better if EXCEPT is supported by Access, you could have:
INSERT INTO Employees
SELECT *
FROM [;DATABASE=C:\Program Files\Northwind.mdb;PWD=none].Employees
EXCEPT
SELECT *
FROM Employees

The columns must be in the same order in both tables in all of the statements in order for them to work.

The need to optimize rises from a bad design.My articles[^]

GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
polishprogrammer8-Jan-09 10:56
polishprogrammer8-Jan-09 10:56 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius8-Jan-09 11:06
mentorWendelius8-Jan-09 11:06 
QuestionSQL Server- Upload CSV file via Bulk Insert with double Quotation Issue? Pin
Tarini Singh5-Jan-09 4:21
Tarini Singh5-Jan-09 4:21 
AnswerRe: SQL Server- Upload CSV file via Bulk Insert with double Quotation Issue? Pin
Wendelius5-Jan-09 9:18
mentorWendelius5-Jan-09 9:18 
QuestionProblem with large database fetching Pin
Member 40015965-Jan-09 2:40
Member 40015965-Jan-09 2:40 
AnswerRe: Problem with large database fetching Pin
Ashfield5-Jan-09 2:54
Ashfield5-Jan-09 2:54 
AnswerRe: Problem with large database fetching Pin
Wendelius5-Jan-09 9:22
mentorWendelius5-Jan-09 9:22 
AnswerRe: Problem with large database fetching Pin
Aman Bhullar6-Jan-09 5:45
Aman Bhullar6-Jan-09 5:45 
GeneralRe: Problem with large database fetching Pin
Member 40015966-Jan-09 20:22
Member 40015966-Jan-09 20:22 
QuestionNeed SQl Query Pin
karthigachawla5-Jan-09 0:48
karthigachawla5-Jan-09 0:48 
AnswerRe: Need SQl Query Pin
SeMartens5-Jan-09 1:09
SeMartens5-Jan-09 1:09 
GeneralRe: Need SQl Query Pin
Ben Fair5-Jan-09 4:13
Ben Fair5-Jan-09 4:13 
GeneralRe: Need SQl Query Pin
SeMartens5-Jan-09 4:26
SeMartens5-Jan-09 4:26 
GeneralRe: Need SQl Query Pin
Ben Fair5-Jan-09 5:51
Ben Fair5-Jan-09 5:51 
QuestionConfused about instance name in SQL cluster Pin
George_George3-Jan-09 23:15
George_George3-Jan-09 23:15 
AnswerRe: Confused about instance name in SQL cluster Pin
Wendelius4-Jan-09 0:49
mentorWendelius4-Jan-09 0:49 
GeneralRe: Confused about instance name in SQL cluster Pin
George_George4-Jan-09 22:23
George_George4-Jan-09 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.