Ignore errors inserting dup records?
From: pt (mnemotronic_at_yahoo.com)
Date: 04/26/04
- Next message: Kevin Collins: "Re: Ignore errors inserting dup records?"
- Previous message: Tim Bunce: "Re: Problems with "tuple_status" in Informix"
- Next in thread: Kevin Collins: "Re: Ignore errors inserting dup records?"
- Reply: Kevin Collins: "Re: Ignore errors inserting dup records?"
- Reply: Matthew Braid: "Re: Ignore errors inserting dup records?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Apr 2004 14:28:18 -0700
I have a table "T" with an autonum primary key field "ID" and a
text/string field "v". The field "v" is indexed and declared UNIQUE.
Is there a syntax which will allow me to add records and ignore (or
not add) any which would violate the "unique" aspect of "v"?
Table "T":
ID v
----
1 I
2 am
3 the
4 walrus
5 oo
6 koo
7 katchoo
Given this table, I run this :
INSERT INTO T (v) VALUES ("The" , "walrus" , "was" , "Paul") ;
The insertion of "walrus" will fail because it already exists, and "v"
is indexed/no_dups. I want the SQL to insert records for "The",
"was", and "Paul", and not error when in sees "walrus" already present
at record #4.
I'm doing this with Perl + DBI/DBD (not ODBC) talking to a MS-Access
.MDB file.
Thanks in advance.
- Next message: Kevin Collins: "Re: Ignore errors inserting dup records?"
- Previous message: Tim Bunce: "Re: Problems with "tuple_status" in Informix"
- Next in thread: Kevin Collins: "Re: Ignore errors inserting dup records?"
- Reply: Kevin Collins: "Re: Ignore errors inserting dup records?"
- Reply: Matthew Braid: "Re: Ignore errors inserting dup records?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]