Wrox Programmer Forums
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 10:16 AM
Authorized User
 
Join Date: Sep 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra
Default Triggers?

Hi
I've following table
table1 (
fld1 number(5) primary key,
fld2 varchar2(20),
fld3 varchar3)

I want a trigger which can stop certain values.
I tried with raise_application_error() proc. But then Oracle cries to handle an unhandled exception. If i'm handling it then then new values gets inserted into table:(

Please Help
Prabodh

__________________
Prabodh
 
Old March 23rd, 2006, 12:53 AM
Registered User
 
Join Date: Apr 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to amolkataria
Default

i think you should handle this in the frontend and not in backend database.

Amol N. Kataria
 
Old March 30th, 2006, 05:51 AM
Authorized User
 
Join Date: Mar 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1) Try making use of CHECK constraint.
2)You can simply write if-else block
   if :new values are proper
         Insert statement.
   end if;

Regards
Milind






Similar Threads
Thread Thread Starter Forum Replies Last Post
triggers Hafiz Muhammad Mushtaq Oracle 5 April 9th, 2009 04:25 PM
Triggers? odezzie Classic ASP Databases 1 March 28th, 2007 06:09 PM
Triggers mrookey SQL Server 2000 2 October 24th, 2006 07:11 AM
Triggers shahchi1 SQL Server 2000 1 November 1st, 2004 06:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.