Re: How can I prevent duplicate rows in a table?

From: Chuck Hamilton <chuckh_at_dvol.com>
Date: 1996/07/31
Message-ID: <31ff7c3c.9599187_at_n5.gbso.net>#1/1


ltracey_at_ac-consulting.ch (Lawrence S Tracey) wrote:

>I have written a program which runs on an IBM mainframe and inserts
>rows into a table on a server. There appears to be an intermitten bug
>which causes some rows to be dropped. The next problem is when the
>program has to be rerun. I get duplicate rows. I have put an index
>on the table but this does not prevent the insertion of duplicate
>rows. Is there a better way.
>Also, the error messages returned vis SQL*NET are garbage in that I
>get the same message "inconsistent data types" regardless of the error
>on the server.
>
>All help greatly appreciated.
>

Add either a UNIQUE or PRIMARY KEY constraint to the table.

--
Chuck Hamilton
chuckh_at_dvol.com

Never share a foxhole with anyone braver than yourself!
Received on Wed Jul 31 1996 - 00:00:00 CEST

Original text of this message