Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Trigger to Prevent Duplicates
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