Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Trigger to Prevent Duplicates

Trigger to Prevent Duplicates

From: Stuart Cowen <stuco_at_cobaltspoon.com>
Date: 18 Mar 2002 12:59:00 -0800
Message-ID: <29563b71.0203181258.28344133@posting.google.com>


I have an Oracle 7.3.4.5.0 database on Solaris with a table that is inserted into via an online application (no batch inserts or updates).

I need to create a trigger that can check for duplicates within certain parameters in a sales results table. For example: Customer A can purchase as many of Product A as he/she wants in a given day, but can only purchase one unit of Product B per day.

So I need a trigger that will reject a duplicate entry of Product B for Customer A for a given day.

How would I go about doing this?

Thanks in advance!

Stuart Cowen
ORACLE DBA
stuco_at_cobaltspoon.com Received on Mon Mar 18 2002 - 14:59:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US