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 -> Function w/Record Param in SELECT?

Function w/Record Param in SELECT?

From: Barry Johnson <BJohnson_at_WorldBank.Org>
Date: 1996/12/17
Message-ID: <32B71B6E.60B0@WorldBank.Org>#1/1

Running V7.1.5, I gather I can do this:

    CREATE PACKAGE/BODY Pkg...

        FUNCTION F( TRow Tbl%ROWTYPE ) RETURNS VARCHAR2 ...

        END Pkg ;

    DECLARE
        TblRow Tbl%ROWTYPE ;
    BEGIN
    SELECT * INTO TblRow FROM Tbl ;
    ... Pkg.F( TblRow ) ...
    END ; Is there a way to short-circuit this with something like?!?:

    SELECT Pkg.F( * ) FROM Tbl ;

That is, I want to call the function from the SELECT and pass it the entire row without having some temp, transitionary variable...guess I'm looking for some symmetry with the

    SELECT COUNT( * )... syntax :-) Alas, as shown doesn't seem to work and I even tried:

    SELECT Pkg.F( Tbl.* ) FROM Tbl ;

to no avail...

-- 
Barry Johnson  -  BJohnson_at_WorldBank.Org
Received on Tue Dec 17 1996 - 00:00:00 CST

Original text of this message

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