Re: Indirectly referencing variables in PL/SQL 2.3

From: Evan Davies <edavies_at_xtra.co.nz>
Date: 1997/01/13
Message-ID: <32D9BD7C.2A00_at_xtra.co.nz>#1/1


Vladimir Stipetic wrote:
>
> I have a question concerning indirectly referencing variables in
> PL/SQL 2.3 (such as forms built-in function NAME_IN).
> Or is it possible to make the same effect with some user defined
> function.
> Thanks in advance,
> Vlado.
>
> This is procedure in which I need that:
> ----------------------------------------------------------------------
> procedure my_proc (mid number) is
> cursor C_COLUMNS is
> select column_name
> from all_tab_columns
> where table_name = 'ORDER';
> cursor C_VALUE (vid number) is
> select *
> from ORDER
> where id = VID;
> order_r order%rowtype;
> v_value varchar2(240);
> begin
> open c_value (mid);
> fetch C_VALUE into order_r;
> close c_value;
> for f in C_COLUMNS loop
> v_value := 'order_r.'||f.column_name;
> dbms_output.put_line(f.column_name||' = '||NAME_IN(v_value));
> ================
> end loop;
> end;
> --
> ----------------------------------------------------------------------
> Vladimir Stipetic Exportdrvo d.d.
> Oracle Designer Developer Marulicev trg 18
> Tel: 385/1/4560-312 10000 Zagreb
> Fax: 385/1/420-004 CROATIA
> Email: vladimir.stipetic_at_exportdrvo.tel.hr Europe
> ----------------------------------------------------------------------

Try dbms_output.put_line(f.column_name||' = '||v_value);

I assume this is a stored PL/SQL procedure you are trying to debug in SQL Plus

NAME_IN() is a forms Built in for use only with forms Received on Mon Jan 13 1997 - 00:00:00 CET

Original text of this message