Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Query

Author  Topic 

Kamlee
Starting Member

6 Posts

Posted - 2004-09-08 : 13:36:43
Hi

I am using Oracle 9i, the scott database and need to implement a constraint to satisfy the following:

The itemtot attribute (the inclusion of which in the database is evidence of very bad design) needs to be automatically maintained and not be directly updateable.

This is how I have tackled it, but I have a feeling the syntax and this type of trigger is incorrect for the above requirement.

CREATE OR REPLACE TRIGGER check_itemtot
AFTER UPDATE OF itemtot ON Item
DECLARE
v_itemtot_changes NUMBER;
BEGIN
SELECT upd, max_itemtot
INTO v_itemtot_changes
FROM audit_table

Any ideas on how to tackle this one, i.e. what type of trigger and syntax, code etc.

Any help would be greatly appreciated.

Thanks.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-08 : 13:55:15
This is a MS SQL Server forum. I suggest posting your question in the Oracle forum at dbforums.com.

Tara
Go to Top of Page
   

- Advertisement -