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

Oracle views and function problems

From: <dbarker_at_tpgi.com.au>
Date: Mon, 04 May 1998 22:05:42 -0600
Message-ID: <6ilvm7$m5l$1@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 Mon May 04 1998 - 23:05:42 CDT

Original text of this message

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