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.





_________________________________________________________________
Por seguridad, no compartas tu contraseña con nadie
www.windowslive-hotmail.com/protectyourself/es/default.htm
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: "Where the Answers Are"

Reply via email to