Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2008, 05:11 AM
Authorized User
 
Join Date: Feb 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hewstone999
Default Removing duplicates

I have two tables: “tmptable” and “CC_CODES”

Both tables contain the same data; however the “tmptable” contains updated data. How can I compare both tables and remove all the duplicate in the tmptable, leaving only the updated data.

I will be comparing the fields “IsMandatory” from both tables


 
Old November 4th, 2008, 01:02 PM
pjm pjm is offline
Authorized User
 
Join Date: Jul 2006
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just to be picky: if tmptable contains updated data then both tables cannot contain the same data.

You don't mention what field you are using to index each record and what field contains the updated info (there has to be more than one field).


      -Phil-
 
Old November 4th, 2008, 05:26 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Agree with PJM. On top of all that, a field named "IsMandatory" sounds like a boolean field (yes/no, true/false), so it sounds like you are saying that a duplicate is *ANY* record where "IsMandatory" is true (or false, whatever your logic).

I don't see how you can possibly mean that, for real.

Show some sample data, at a minimum.





Similar Threads
Thread Thread Starter Forum Replies Last Post
removing duplicates havey C# 9 February 26th, 2008 02:05 PM
Yes to duplicates MMJiggy62 Beginning VB 6 3 July 14th, 2006 11:51 AM
Avoiding Duplicates fixitman Access 1 April 27th, 2004 10:43 AM
Deleting duplicates prabodh_mishra SQL Server 2000 3 September 23rd, 2003 09:04 AM
Duplicates ashley_y Access 11 August 14th, 2003 03:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.