I'm in the process of cleaning up a very ugly and very old table. We intend to use a field called "serial_num" as the primary key. However, the serial_num field is not unique due to bad data. I need to pull out all the records where serial_num is unique (the rest will be dealt with later).
This:
select unique(serial_num), field2, field3 from tablename;
... returns serial numbers that aren't unique because field2 - field3 were entered in different ways.
ex.
Serial_num field2 field3
------------ --------- --------
100 valve hand
100 valve, hand
100 vlv hd
... this returns, but serial_num is not unique though the record is. I want the whole record, but only if serial_num is unique. How do you accomplish this?
Thanks in advance!
This:
select unique(serial_num), field2, field3 from tablename;
... returns serial numbers that aren't unique because field2 - field3 were entered in different ways.
ex.
Serial_num field2 field3
------------ --------- --------
100 valve hand
100 valve, hand
100 vlv hd
... this returns, but serial_num is not unique though the record is. I want the whole record, but only if serial_num is unique. How do you accomplish this?
Thanks in advance!