Hi I'm a newbie here. I'm hoping someone can help me..
Here is the scenario:
I have a bunch of duplicate records I need to clean up
This query below will help me identify the list of duplicate records.
select * from Tablename
where acctdebitid like '57%' and status = 'WILLPROCESSON'
and datecreate like '2006/01/13%'
order by customerid, id, listid, date
All the columns are dups with the exception of one obvious one which is the primary key.
I would like to be able to iterate through this entire list and identify the first row in a set of duplicate records and do an update. Is this possible in SQL ?
Thanks in advance!
Here is the scenario:
I have a bunch of duplicate records I need to clean up
This query below will help me identify the list of duplicate records.
select * from Tablename
where acctdebitid like '57%' and status = 'WILLPROCESSON'
and datecreate like '2006/01/13%'
order by customerid, id, listid, date
All the columns are dups with the exception of one obvious one which is the primary key.
I would like to be able to iterate through this entire list and identify the first row in a set of duplicate records and do an update. Is this possible in SQL ?
Thanks in advance!
Comment