By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,664 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,664 IT Pros & Developers. It's quick & easy.

Delete duplicate data in Access

P: n/a
Hi MS Access & MS SQL Server Gurus !

I am trying to delete duplicate data from a LINKED SQL Server 2000
table (LinkedTable) and insert the result into a local (in Access)
table.

The following code works in SQL Server 2000 but NOT in Access, could
any one tell me what's wrong with it?

SELECT a.id, a.change_id AS chgid, a.Action_desc as Actiondescr INTO
LocalTable
From dbo.LinkedTable as a
Where a.id = (
Select TOP 1 b.id
From dbo.LinkedTable as b
Where a.change_id = b.change_id
Order By b.time_stamp)

Thanks in advance !
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Charles" <de*********@hotmail.com> wrote in message
news:be**************************@posting.google.c om...
Hi MS Access & MS SQL Server Gurus !

I am trying to delete duplicate data from a LINKED SQL Server 2000
table (LinkedTable) and insert the result into a local (in Access)
table.

The following code works in SQL Server 2000 but NOT in Access, could
any one tell me what's wrong with it?

SELECT a.id, a.change_id AS chgid, a.Action_desc as Actiondescr INTO
LocalTable
From dbo.LinkedTable as a
Where a.id = (
Select TOP 1 b.id
From dbo.LinkedTable as b
Where a.change_id = b.change_id
Order By b.time_stamp)

Thanks in advance !


no code please is stupid. you make 1 query and do job easy.

1 query is access SELECT find all record you want deleted. run query on sql
table. is OK? find all record you want deleted? OK now you turn SELECT to
APPEND you get data OK into local table yes? now you turn APPEND to
DELETE. you get sql record deleted. all simple 1 query please.

*Sherwood Wang MVP*

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.