Re: substring in database trigger

From: Dharambir Marwaha <dharambirmarwaha_at_hotmail.com>
Date: Mon, 18 Jan 1999 12:09:09 -0500
Message-ID: <36A36AB5.4E41FFC0_at_hotmail.com>


Check the datatypes and field length of v_trx_type,v_trx_type_bis. v_trx_type should be of "name" type and >= its declared length.

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 - 18:09:09 CET

Original text of this message