Re: %TYPE DECLARATIONS

From: Michael Campbell <Mcampbell_at_btinternet.com>
Date: 1998/01/27
Message-ID: <01bd2b73$05390be0$143763c3_at_mars>#1/1


You've missed off the DIRECTION of the parameter! should be CURSOR cursor_name (p_1 IN owner.table.column%TYPE,

                        p_2 IN etc etc) IS
Try that it should compile!

Mike Campbell
Jireh Consultancy Limited

Authorized User <sazua_at_mail.sdsu.edu> wrote in article <01bd2b31$3d765900$0d35bf82_at_sara.sdsu.edu>...
>
> Anchored Datatype question.
>
> In PL/SQL I have defined a cursor using the %TYPE attribute. The variable
> that I am declaring is being anchored to a column in a table that belongs
> to different user. For example
>
> CURSOR get_all_rec (in_year owner.table.column%TYPE)
> IS
> SELECT ssn
> FROM all_records
> WHERE year = in_year ;
>
> At compile time, the error "identifier 'table' must be declared". It
> interprets owner as table and table as column. I've created a synonym
 for
>
> the other user's table, but it still doesn't work.
>
> Thanks in advance for any suggestions in trying to solve this problem.
>
> Sara[EOB]
>
>
  Received on Tue Jan 27 1998 - 00:00:00 CET

Original text of this message