Ron Johnson wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/25/07 09:30, Inoqulath wrote:
Hello Folks
Have a look at this Table:
CREATE TABLE foo(
id serial,
a_name text,
CONSTRAINT un_name UNIQUE (a_name));
Obviously, inserting a string twice results in an error ...is there any "conflict algorithm" (SQLite:"INSERT OR
[IGNORE|ABORT] INTO foo [...]")?...
No.
Unique \U*nique"\, a. [F. unique; cf. It. unico; from L. unicus,
from unus one. See {One}.]
Being without a like or equal; ...
I think he is not asking "How do I insert duplicate rows into a
unique-constrained column?", but rather that he wants to have the insert
transaction proceed successfully, ignoring the duplicates, i.e., the
resulting inserted rows will number less than the original source rows
by exactly the subset of duplicate source rows.
My suggestion would be to load the data into an unconstrained temporary
table, then select distinct from that for insertion into your actual
working table.