Normal Topic Identify non duplicates (Read 933 times)
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Identify non duplicates
Nov 10th, 2005 at 4:20am
Print Post Print Post  
I need to import records into a database that already contains some of the imported records but not all.
So when the import is done I will end up with some duplicates and some new ones.
I need to identify de new ones (the non duplicates).
Is there a simple way to do that?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Identify non duplicates
Reply #1 - Nov 10th, 2005 at 5:07pm
Print Post Print Post  
Do you want just the newly imported ones, or just the ones that were not already in the database?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Re: Identify non duplicates
Reply #2 - Nov 10th, 2005 at 5:18pm
Print Post Print Post  
I want the ones that were not already in the database.

Etejeira
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Identify non duplicates
Reply #3 - Nov 11th, 2005 at 2:18pm
Print Post Print Post  
Does each record have a unique identifier such as an ID number?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Re: Identify non duplicates
Reply #4 - Nov 11th, 2005 at 2:39pm
Print Post Print Post  
There is not an ID field.
However, there is a field which is different for each record and can be used as an ID field.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Identify non duplicates
Reply #5 - Nov 17th, 2005 at 2:47pm
Print Post Print Post  
What you can do is retrieve all your records. Run a Mass Update. The Mass update is going to run an @XLookupAll() command looking up records based on that unique field. Then you can count the number of records returned by using @CountStringArray(). If the number of records returned is greater than one you can either set a new element on the record to be some value, this way all the records that are new will have no value in that record and you can retrieve by using a '=' at the retrieve spec. Or you can use @SelectTreeItem() to remove the record that has a dup from the resultset so you will be left with a result set of only the new records.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
etejeira
Junior Member
**
Offline


No personal text

Posts: 60
Joined: Aug 6th, 2005
Re: Identify non duplicates
Reply #6 - Nov 17th, 2005 at 5:00pm
Print Post Print Post  
Both alternatives sound interesting.
Thanks a milllion.
Etejeira
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Identify non duplicates
Reply #7 - Nov 17th, 2005 at 5:04pm
Print Post Print Post  
You are welcome.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged