I use Cold Fusion to loop over a distinct query for the table that contains the duplicates. Note that your table needs to have OIDs, or a unique primary key.
column_a is the key field I want to eliminate duplicates on
SELECT distinct column_a
FROM table_a;
CFLOOP over the above query - query_a
DELETE FROM table_a
WHERE column_a = #query_a.column_a#
AND OID < (
SELECT OID
FROM table_a
WHERE column_a = #query_a.column_a#
ORDER BY OID DESC
LIMIT 1
);
/CFLOOP
|
|
||||
|
Search
Categories
Recent Photos
Recent Visitors
Cristian - Thu 19 Feb 2009 01:10 AM PST
April Lorenzen - Fri 11 Apr 2008 08:31 AM PDT
kitchen - Wed 23 May 2007 11:00 PM PDT
Al Turtle - Fri 24 Mar 2006 04:52 PM PST
Lelain - Sun 19 Feb 2006 10:17 PM PST
Recent Entries
Recent Comments
This Month
Month Archive
Login
|
Friday, April 7
by
April Lorenzen
on Fri 07 Apr 2006 03:40 PM EDT
|
|||
|
|
||||