delete b from icd9x10 a
join icd9x10 b on a.icd9 = b.icd9 and a.id < b.id
>...
> CREATE TABLE `ICD9X10` (
> ...
> id icd9 icd10
> 25 29182 F10182
> 26 29182 F10282
> ...
Good luck,
Bob
On 3/29/2014 2:26 PM, william drescher wrote:
I am given a table: ICD9X10 which is a maping of ICD9 codes to
ICD10 codes. Unfortunately the table contains duplicate entries
that I need to remove.
CREATE TABLE `ICD9X10` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`icd9` char(8) NOT NULL,
`
10158
Direct: (646) 487-6522 | Fax: (646) 487-1569 | dle...@univision.net |
www.univision.net
-Original Message-
From: william drescher [mailto:will...@techservsys.com]
Sent: Saturday, March 29, 2014 2:26 PM
To: mysql@lists.mysql.com
Subject: Help with cleaning up data
I am given a table: IC
On 29-03-2014 19:26, william drescher wrote:
I am given a table: ICD9X10 which is a maping of ICD9 codes to ICD10
codes. Unfortunately the table contains duplicate entries that I need
to remove.
...
I just can't think of a way to write a querey to delete the duplicates.
Does anyone have a sugg
Hi Bill,
How big is your table? It seems to me that you might want to change your
unique keys to something like (icd9, icd10), thus guaranteeing that every
mapping will exist only once in your table. You could create a new table
with that constraint and copy all your data to it:
CREATE TABLE `ICD
I am given a table: ICD9X10 which is a maping of ICD9 codes to
ICD10 codes. Unfortunately the table contains duplicate entries
that I need to remove.
CREATE TABLE `ICD9X10` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`icd9` char(8) NOT NULL,
`icd10` char(6) NOT NULL,
PRIMARY KEY (`id`),
U