Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How to use a row * AS a ROWTYPE parameter for a stored FUNCTION in a SELECT statement
Dear all,
Suppose I have a FUNCTION as below:
CREATE OR REPLACE FUNCTION test (x myTable%ROWTYPE) RETURN INTEGER AS BEGIN RETURN 1; END; How can I pass a whole row to it in a SELECT statement? For example:
SELECT test(*) FROM myTable; -- doesn't work
SELECT test(t.*) FROM myTable t; -- doesn't work
What is the correct way to achieve this? Thank you very much.
John Lin
P.S. For the following statement:
SELECT t.*, SYSDATE, t.* FROM myTable t;
it works to treat * as a whole row. Don't know why it won't for test(t.*). Received on Wed Aug 18 2004 - 23:52:15 CDT