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: substring in a database trigger

Re: substring in a database trigger

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 18 Jan 1999 19:49:15 +0100
Message-ID: <36A3822B.BF699605@sybrandb.demon.nl>


Hi Koen,
You actually can use substr as long as you alias this expression cursor ... is
select substr(name,1,3) new_string
etc...

The same applies for all other functions and expressions.

Hth,

Sybrand Bakker, Oracle DBA

Koen Van Vaerenberg wrote:

> hello ,
> does anybody knows how to use a substring in a database trigger ?
>
> CURSOR C_TRXTYPE IS
> SELECT name -- you can't use substr here
> FROM <table_name>
> WHERE cust_trx_type_id = :new.cust_trx_type_id ;
>
> OPEN C_TRXTYPE ;
> FETCH C_TRXTYPE INTO v_trx_type ;
> CLOSE C_TRXTYPE ;
>
> IF V_TRX_TYPE IS NOT NULL THEN
>
> v_trx_type_bis := substr(v_trx_type,1,3) ; -- this doesn't work
> either
>
> END IF ;
>
> This trigger gives a ' value_error' - code...
>
> Thanks in advance
>
> Koen
>
> kds_at_athylon.be


Received on Mon Jan 18 1999 - 12:49:15 CST

Original text of this message

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