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 -> Function Return Type Record, How to call ?

Function Return Type Record, How to call ?

From: Sean Zhang <sean_at_cnfei.com>
Date: Fri, 18 Jun 1999 00:17:45 GMT
Message-ID: <Jega3.6935$AO1.19582677@firenze.visi.net>


Hi, Evveryone,

I need a customized calculation for a query( view) , so I came up with the following solution:

  Create Pakage FEE_PKG is

           Type FEE_TYPE is  Record(duty_fee  number(5,2),
                                                              frt_fee
number(5,2),
                                                              agent_fee
number(5,2),
                                                              .............
                                                              desn_fee
number(6,2)
                                                             );
           Function  Fee_function ( Part#  IN varchar2) return FEE_TYPE;
     end FEE_PKG;

--------also with the pakage body to calculate all sorts of cost.

 The pakage and body were compiled and fine.

 Question:

    suppose I have a <stock> table with a column <part#> and I want to Make a

    view to list all kinds of Cost associated with the <part#> , I create a View like :

   Create or replace view COST_VIEW as
    select s.part# , fee_pkg.fee_function.duty_fee as duty_fee,    fee_pkg.fee_function.frt_fee as frt_fee from stock s ;

 Then I got error message like :

       "Invalid column name " ..

 I know something is wrong with the function datatype. Can anybody help me?

Any suggestions and advises are greatly appreciated.

Sean Zhang
mailto:sean_at_cnfei.com Received on Thu Jun 17 1999 - 19:17:45 CDT

Original text of this message

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