Re: [SQL] Removing duplicate rows

2007-02-06 Thread Thomas Kellerer
Paul Lambert wrote on 06.02.2007 23:44: Sort on Weenblows is a bastard to work with, and I don't believe it has a unique option. I probably should have mentioned this was on Weenblows. You can get all (or most?) of the *nix/GNU commandline tools for Windows as well. As "native" Win32 progra

Re: [SQL] Removing duplicate rows

2007-02-06 Thread Hélder M . Vieira
As the table definitions get updated frequently, I'd like to put in my script to create the table as a copy of the existing 'real' table. I'm assuming "create table as" would be what I need to use, but what would I use as the select sql - i.e. how do I use select to pull the definition of a tab

Re: [SQL] Removing duplicate rows

2007-02-06 Thread Paul Lambert
Andrew Sullivan wrote: On Wed, Feb 07, 2007 at 07:15:02AM +0900, Paul Lambert wrote: I'm assuming the best way to get around this is to load the data into a temporary table with "copy from" and then do a "select distinct into" my real table. You might find that sort|uniq at the command prompt

Re: [SQL] Removing duplicate rows

2007-02-06 Thread Andrew Sullivan
On Wed, Feb 07, 2007 at 07:15:02AM +0900, Paul Lambert wrote: > > I'm assuming the best way to get around this is to load the data into a > temporary table with "copy from" and then do a "select distinct into" my > real table. You might find that sort|uniq at the command prompt would be better.

[SQL] Removing duplicate rows

2007-02-06 Thread Paul Lambert
I have some tables which I need to load from flat data files that can contain upwards of five million rows. It's possible (owing to the structure of the system the data is originating from) that on occasion the data extract that generates these flat files can include two records that have the