Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pass rowtype from SQL to PL/SQL

MortenBratenMar 3 2017 — edited Mar 3 2017

I wish it was possible to pass a rowtype from a SQL statement to PL/SQL, like this:

create or replace function get_row_text (p_row in emp%rowtype) return varchar2

as

begin

  return p_row.empno || ' ' || p_row.ename;

end get_row_text;

select get_row_text(e.*) as the_text

from emp e

This currently fails with ORA-01747: invalid user.table.column, table.column, or column specification

See also https://twitter.com/mortenbraten/status/832642914136186884

- Morten

Comments
Post Details
Added on Mar 3 2017
3 comments
518 views