Search
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 
This Month
April 2006
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Year Archive
Login
User name:
Password:
Remember me 
View Article  Debian Linux Locale LANG and the sort non-bug
"... setting LANG=en_US then people post bugs to the GNU coreutils
about it claiming it is a bug. See the ...   more »
View Article  What I want for my birthday
Yep tomorrow is my birthday. 44.

I would like a toaster and cds of the "Starseeds" and or William Orbit ...   more »
View Article  Eliminate Duplicates from Postgresql Tables
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