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: Oracle views and function problems

Re: Oracle views and function problems

From: Saad Ahmad <saad.ahmad_at_mchugh.com>
Date: 5 May 1998 14:34:26 GMT
Message-ID: <01bd7832$ead88c00$2207030a@sahmad-pc.mfa.com>


create or replace view v_actuals as
select substrb( lineitem(accnbri), 1, 5 ) <<<<---------

dbarker_at_tpgi.com.au wrote in article <6ilvm7$m5l$1_at_nnrp1.dejanews.com>...
> I am using an Oracle 7.3 database and am having a strange problem. I am
not
> an Oracle DBA so forgive me if the naming I use is incorrect.
>
> I have created an Oracle function that takes one input VARCHAR parameter
and
> returns a VARCHAR2(5) value. I have created a view that selects records
from
> a table and uses this function. When I perform a DESC on the view the
> function is of type VARCHAR2(2000). Does anybody have any ideas?
>
> Below are the definitions of my function and view.
>
> FUNCTION lineitem(accnbri in VARCHAR2)
>
> RETURN VARCHAR IS tmp VARCHAR(5);
> BEGIN
> tmp := SUBSTR(accnbri, 12, 5);
> return tmp;
> END;
>
> CREATE OR REPLACE VIEW V_ACTUALS AS SELECT lineitem(accnbri) as
line_item,
> glf_ldg_acct.* FROM glf_ldg_acct
>
> Thanks,
>
> Dave
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
Received on Tue May 05 1998 - 09:34:26 CDT

Original text of this message

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