PC Review


Reply
Thread Tools Rate Thread

comparing records

 
 
Ezekiël
Guest
Posts: n/a
 
      7th Nov 2003
Hi everyone,

Can someone tell me how to compare records where one field may have double
values, but in the other fields not.

Greetings,

Ezekiel


 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      7th Nov 2003
Ezekiël

Could you provide an example?

Jeff Boyce
<Access MVP>

 
Reply With Quote
 
Ezekiël
Guest
Posts: n/a
 
      7th Nov 2003
Jeff,

For example i have in field1 clientnrs, field2 kwantities, field 3 amounts.
field1 must be unique.

I've got duplicate records but i want to compare which one i can drop.

e.g. record 1
field1 = 1
field2 = 10
field3 = 100

record 2
field1 = 1
field2 = 10
field3 = 101

"Jeff Boyce" <(E-Mail Removed)-DISCARD_HYPHEN_TO_END> wrote in message
news:%(E-Mail Removed)...
> Ezekiël
>
> Could you provide an example?
>
> Jeff Boyce
> <Access MVP>
>



 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      8th Nov 2003
Are you saying that you consider the two records you gave as an example to
be equal? I see that the first two fields are equal, but not the entire
records...

Jeff Boyce
<Access MVP>

 
Reply With Quote
 
=?Utf-8?B?ZXpla2nDq2w=?=
Guest
Posts: n/a
 
      10th Nov 2003
Yes, that is what i mean
 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      10th Nov 2003
One approach might be to build a query that only returns the fields for
which you wish to find duplicates (i.e., the set of fields that you think
may match). Then, using the first query as your source, build a second
query using the Query Wizard that finds duplicates.

Good luck

Jeff Boyce
<Access MVP>

 
Reply With Quote
 
Ezekiël
Guest
Posts: n/a
 
      10th Nov 2003
Jeff,

But how about the fields that are not duplicate but has the same id.
"Jeff Boyce" <(E-Mail Removed)-DISCARD_HYPHEN_TO_END> wrote in message
news:%(E-Mail Removed)...
> One approach might be to build a query that only returns the fields for
> which you wish to find duplicates (i.e., the set of fields that you think
> may match). Then, using the first query as your source, build a second
> query using the Query Wizard that finds duplicates.
>
> Good luck
>
> Jeff Boyce
> <Access MVP>
>



 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      11th Nov 2003

"Ezekiël" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Jeff,
>
> But how about the fields that are not duplicate but has the same id.


Perhaps I'm still not understanding. I thought you were looking for the
records that DO match... Wouldn't that mean they have the same ID?

My suggestion was to leave out the non-duplicate fields in the first query,
so as to find those that DO match by ID. Then, in the second query, based
on the first, join back to the table to inspect the non-duplicate values.

Good luck

Jeff Boyce
<Access MVP>

 
Reply With Quote
 
Ezekiël
Guest
Posts: n/a
 
      11th Nov 2003
Can you give me an example?
"Jeff Boyce" <(E-Mail Removed)-DISCARD_HYPHEN_TO_END> wrote in message
news:(E-Mail Removed)...
>
> "Ezekiël" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Jeff,
> >
> > But how about the fields that are not duplicate but has the same id.

>
> Perhaps I'm still not understanding. I thought you were looking for the
> records that DO match... Wouldn't that mean they have the same ID?
>
> My suggestion was to leave out the non-duplicate fields in the first

query,
> so as to find those that DO match by ID. Then, in the second query, based
> on the first, join back to the table to inspect the non-duplicate values.
>
> Good luck
>
> Jeff Boyce
> <Access MVP>
>



 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      11th Nov 2003

"Ezekiël" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can you give me an example?


Here's the example you gave...

> I've got duplicate records but i want to compare which one i can drop.
>
> e.g. record 1
> field1 = 1
> field2 = 10
> field3 = 100
>
> record 2
> field1 = 1
> field2 = 10
> field3 = 101


In this thread, I believe you've described these two records as "matching".
If the only field you are considering as "matching" is field1, then use the
Query Wizard, select "find duplicate...", select the table, select only
field1, and run it. Given the two records you gave, the query should return
a row saying that field1 is duplicated.

If you are considering field2 as also part of what "matches", then also
include that field in the above query.

When this "find duplicates..." query is working, you will know which records
have more than one "match" on the field(s) you have selected.

Of the two records you gave, which one do you wish to eliminate? How did
you decide? How do you propose to tell Access how to decide?

If this doesn't work for you, respond back. There are other approaches we
can try.

Good luck

Jeff Boyce
<Access MVP>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing Possible Like Records sherriross81 Microsoft Access Queries 5 18th Sep 2008 08:57 PM
Comparing Records Help?? Adam Microsoft Access 1 23rd Apr 2008 08:57 PM
Comparing fields and records and updating records cebAccess Microsoft Access Database Table Design 2 5th Oct 2006 02:59 PM
Comparing records =?Utf-8?B?Um9ubmll?= Microsoft Access Form Coding 3 15th Oct 2004 03:39 AM
Re: comparing records GVaught Microsoft Access Reports 0 5th Sep 2003 09:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:14 AM.