Return-Path: <root@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h45K4cw23595
 for <oracle-l@orafaq.net>; Mon, 5 May 2003 15:04:38 -0500
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h45K4bA23590
 for <oracle-l@orafaq.net>; Mon, 5 May 2003 15:04:38 -0500
Received: from fatcity.com (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id KAA79059;
 Mon, 5 May 2003 10:39:25 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 0058FD95; Mon, 05 May 2003 10:16:43 -0800
Message-ID: <F001.0058FD95.20030505101643@fatcity.com>
Date: Mon, 05 May 2003 10:16:43 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Igor Neyman" <ineyman@perceptron.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Igor Neyman" <ineyman@perceptron.com>
Subject: Re: Script to grab trigger source with conditions?
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Barbara,

Did you mean "when" clause (not "where" clause)?
There is "when_clause" column in all/dba/user_triggers.
So, you could just add it to the script, you have.

Igor Neyman, OCP DBA
ineyman@perceptron.com
  


----- Original Message ----- 
To: "Multiple recipients of list ORACLE-L" <ORACLE-L@fatcity.com>
Sent: Monday, May 05, 2003 12:32 PM


> Hi, all.
> Does anyone have a script they're willing to share
> that will capture the trigger source including a
> "where" clause?
> 
> I got the text below from asktom.  It grabs everything
> except the where.  Didn't find anything in our
> archives or google.
> 
> TIA for any help!
> Barb
> Oracle 8.1.7.4
> Solaris 2.6
> 
> select
> 'create or replace trigger "' ||
>          trigger_name || '"' || chr(10)||
>  decode( substr( trigger_type, 1, 1 ),
>          'A', 'AFTER', 'B', 'BEFORE', 'I', 'INSTEAD
> OF' ) ||
>               chr(10) ||
>  triggering_event || chr(10) ||
>  'ON "' || table_owner || '"."' ||
>        table_name || '"' || chr(10) ||
>  decode( instr( trigger_type, 'EACH ROW' ), 0, null,
>             'FOR EACH ROW' ) || chr(10) ,
>  trigger_body
> from user_triggers
> where trigger_name = upper('&1')
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Barbara Baker
>   INET: barbarabbaker@yahoo.com
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 
> 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Igor Neyman
  INET: ineyman@perceptron.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

