Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle pipelined table function table row type query
On May 13, 2:51 pm, Barry Bulsara <bbulsar..._at_hotmail.com> wrote:
> Hi all, 10.1EE on W2K. I am attempting to write a pipelined table
> function that returns a type typTest. I want typTest to be a row type
> of an existing table, not a new object definition, but I keep getting
> errors. Does anyone have any suggestions.
>
> Thank you
> Barry
>
> CREATE OR REPLACE TYPE typTest AS TABLE OF test1%ROWTYPE;
> /
>
> Errors for TYPE TYPTEST:
>
> LINE/COL ERROR
> --------
> -----------------------------------------------------------------
> 0/0 PL/SQL: Compilation unit analysis terminated
> 1/26 PLS-00329: schema-level type has illegal reference to
> SCOTT.TEST1
CREATE TYPE is documented in the SQL reference:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8001.htm
There is no '%ROWTYPE' option. In fact the '%' symbol does not even appear on the page, which might have been a clue when you were checking the syntax before posting ;) Received on Mon May 14 2007 - 03:47:43 CDT
![]() |
![]() |