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 -> Re: spooling TRIGGER_BODY

Re: spooling TRIGGER_BODY

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 19 Jan 2005 15:00:54 -0800
Message-ID: <41eee69a$1_2@127.0.0.1>


Andy Hassall wrote:

> On Tue, 18 Jan 2005 15:23:36 -0800, DA Morgan <damorgan_at_x.washington.edu>
> wrote:
>
>

>>JR wrote:
>>
>>
>>>When I try to spool a trigger body it wraps the characters past 80
>>>characters to the next line. How can I prevent this from happening?
>>>The set line command doesn't seem to help.
>>>
>>>See how the create_date statement is chopped in the example below :
>>>
>>>sqlplus> set line 200
>>
>>Where did you find your sytax for SQL*Plus?
>>
>>SQL> set linesize 200

>
>
> "set line 200" and "set linesize 200" are equivalent and both valid. As are:
>
> SQL> set lin 20
> SQL> show linesize
> linesize 20
> SQL> set line 30
> SQL> show linesize
> linesize 30
> SQL> set lines 40
> SQL> show linesize
> linesize 40
> SQL> set linesi 50
> SQL> show linesize
> linesize 50
> SQL> set linesiz 60
> SQL> show linesize
> linesize 60
> SQL> set linesize 70
> SQL> show linesize
> linesize 70
>
> http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1012664
> "SET LIN[ESIZE] {80|n}"
>
> For the SQL*Plus SET commands, you can abbreviate off any part of the bit in
> square brackets.
>
> To the OP: if you want a longer line for trigger body, one approach is to use
> the "column" command, e.g.: (and most likely the long line here will wrap in
> the post... but it's not wrapped in SQL*Plus)
>
> SQL> set long 10000
> SQL> set line 200
> SQL> select trigger_body from user_triggers where trigger_name = 'T_TEST';
>
> TRIGGER_BODY
> --------------------------------------------------------------------------------
> begin
> null;--
> testinglonglinetestinglonglinetestinglonglinetestinglonglinetestingl
> onglinetestinglongline
> end;
>
>
> SQL> column trigger_body format a256
> SQL> /
>
> TRIGGER_BODY
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> begin
> null;--
> testinglonglinetestinglonglinetestinglonglinetestinglonglinetestinglonglinetestinglongline
> end;
>
>
> Also from the SQL*Plus manual:
>
> "A LONG, CLOB, NCLOB or XMLType column's width defaults to the value of SET
> LONGCHUNKSIZE or SET LONG, whichever one is smaller."
>
> LONGCHUNKSIZE defaults to 80, hence the 80 character column. After exiting and
> restarting SQL*Plus to clear the previous settings:
>
> SQL> set long 10000
> SQL> set longchunksize 10000
> SQL> set line 200
> SQL> select trigger_body from user_triggers where trigger_name = 'T_TEST';
>
> TRIGGER_BODY
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> begin
> null;--
> testinglonglinetestinglonglinetestinglonglinetestinglonglinetestinglonglinetestinglongline
> end;

Thanks. I needed that slap. Now what was the OP's problem before I jumped too soon from the end of the pier?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Jan 19 2005 - 17:00:54 CST

Original text of this message

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