Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Function w/Record Param in SELECT?
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.OrgReceived on Tue Dec 17 1996 - 00:00:00 CST