Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Are Triggers Really that Bad or ....???

Re: Are Triggers Really that Bad or ....???

From: Christopher Beck <christopher.beck_at_oracle.com>
Date: Wed, 14 Aug 2002 16:37:55 -0400
Message-ID: <ngz69.25$R94.236@news.oracle.com>

concat in a new line character

ops$clbeck_at_ORA8I.WORLD> select 'line 1' || chr(10) || 'line 2' || chr(10) || 'line 3' from dual;

'LINE1'||CHR(10)||'L



line 1
line 2
line 3

hope this helps

chris.

--
Christopher Beck, Principal Technologist, Oracle Corporation,
christopher.beck_at_oracle.com
Beginning Oracle Programming,
http://www.amazon.com/exec/obidos/ASIN/186100690X


"Ronnie Yours" <ronnie_yours_at_yahoo.com> wrote in message
news:ajee01$6bd$1_at_nntp-m01.news.aol.com...

> Hi,
>
> I tried playing around with the idea of reducing the amount of work
needed
> to automate the process of creating triggers for all the tables and this
is
> what i came up with
>
> select 'Create or replace Trigger '||table_name||'_Trigger BEFORE INSERT
OR
> UPDATE ON '||
> table_name||' for each row BEGIN IF inserting THEN
> :NEW.created_date:=sysdate; :NEW.created_by:=user; END IF; If Updating
> then :NEW.updated_date:=sysdate; :NEW.updated_by:=user; end if; END; /'
> from dba_tab_columns where column_name='CREATED_DATE'
>
> I spool the above query into a file and execute it.
>
> It would work fine , but the only problem is the / at the end of the
> procedure it creates. The / should appear on the next line and I am not
able
> to do so. Is there a way I can force a carriage return before the /.
>
> If i manually edit the output of the above query so that the / appears on
> the next line of each result set, it works great.
>
> Please suggest
>
> Thanks
> Ronnie
>
>
Received on Wed Aug 14 2002 - 15:37:55 CDT

Original text of this message

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