This may be a silly question, but are they really duplicates (that is, they're 
the same person and not two people with the same name)?  If not, why not just 
use the existing Customer ID field or something like that that is probably 
already unique?

Lyle

From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Hyunkel v2.0
Sent: Thursday, April 16, 2009 11:01 PM
To: [email protected]
Subject: Sybase

**
Hi Listers:

I'm running out with an issue with Sybase

I  have a table with some duplicate values, like this:

First Name | Last Name | Customer ID | entry id
John         | Smith       | 1                | 123
John         | Smith       | 2                | 124
John         | Simmons   | 3                | 125
John         | Simmons   | 4                | 126

I run from remedy a sql to synchronize the Customer ID and set it as "First 
Name+Last Name"

so the result table must be:

First Name | Last Name | Customer ID  | entry id
John         | Smith       | JohnSmith     | 123
John         | Smith       | JohnSmith     | 124
John         | Simmons   | JohnSimmons | 125
John         | Simmons   | JohnSimmons | 126

But The Customer ID must be a unique value, so this rule generates that exists 
on the system duplicate records.

I need to find a SQL statement that:

* Identify duplicate records.
* Let set as Customer ID the entry id value

I'm usign sybase 13, actually i have sql sentences to give the number of 
duplicate records, but those don't let me update due the subquery returns more 
than 1 row.

Any thoughts?

Any help will be appreciate

Best Regards

Hugo Ruesga
perotsystems®
US  972.577.7000
MX +52 (33) 3332.3868
P Please consider the environment before printing this email
The information contained in and transferred with this electronic message is 
intended only for the recipient(s) designated above, it is protected by law and 
it may contain information which is privileged and confidential. If you are not 
the intended recipient, please do not read, copy, or use it, and do not 
disclose it to others. Please notify the sender of the delivery error by 
replying to this message, and then delete it from your system. Thank you.



________________________________
Actualiza tu Perfil de Windows Live y cuéntale al mundo quién 
eres<www.actualizatuperfil.com.mx>
_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_


 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

Reply via email to