On Wed, Sep 20, 2006 at 22:18:04 -0700,
TJ O'Donnell <[EMAIL PROTECTED]> wrote:
> I want to make a table that has unique rows - no problem.
> Create Table x (smarts Varchar Unique);
>
> I have input data that has many duplicates and until now
> I was creating a temp table allowing duplicates, an
Markus, Kaloyan, and all
Thanks for the help on this. I got the trigger to work properly,
although I discovered that a trigger in SQL is not allowed, so I
wrote it in plsql. It was very, very slow. So I finally decided
to filter the input before attempting to Copy it into the table,
using a pe
Hi, TJ,
TJ O'Donnell wrote:
> So, is there a way (a constraint, a check?) that will simply
> REJECT a duplicate when I insert the raw data directly into x
> rather than FAILING on an error as it does
> with the unique constraint above?
Failing on an error is exactly the way PostgreSQL (and the S
HI,
1. You can try to create a trigger before insert to check if the new row
exists in the table and if it does to cancel the insert.
2. Or create a UNIQUE INDEX on all the columns which will throw error if
you try to insert duplicate rows in the table.
Then in the apllication software just cat
I want to make a table that has unique rows - no problem.
Create Table x (smarts Varchar Unique);
I have input data that has many duplicates and until now
I was creating a temp table allowing duplicates, and then
Insert into x (smarts) select distinct smarts from tmpx;
This is now failing when I