Xref: alice comp.databases.oracle.misc:35542 comp.databases.oracle.server:56368 comp.databases.oracle.tools:27912
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!dispose.news.demon.net!demon!news.demon.co.uk!demon!jlcomp.demon.co.uk!not-for-mail
From: "Jonathan Lewis" <jonathan@jlcomp.demon.co.uk>
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.tools,comp.databases.oracle.server
Subject: Re: Name-in Function
Date: Wed, 7 Jul 1999 16:45:01 +0100
Message-ID: <931362632.14254.0.nnrp-09.9e984b29@news.demon.co.uk>
References: <3783568d.0@145.227.194.253>
X-Trace: news.demon.co.uk 931362632 nnrp-09:14254 NO-IDENT jlcomp.demon.co.uk:158.152.75.41
X-Complaints-To: abuse@demon.net
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Lines: 34

Can you not change the 'host of variables' to
an array, then do:

for x in 1..5 loop
   v_fieldr(x) ) := 'blah'
end loop;

BTW - if you are working on dynamic select statements
in PL/SQL, I've just posted a chunk of code on my website.
--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Mark G wrote in message <3783568d.0@145.227.194.253>...
>Hi,
>
>Is anyone aware of a function in PL/SQL equivalent to the NAME_IN function
>in forms?
>
>Basically, i have a host of variables, v_field_1, v_field_2 etc.  The
number
>at the end can vary.
>
>At runtime, depending on the number of fields the query has, i want to use
>one of these variables.  In forms, i could do a loop like
>
>for x in 1..5 loop
>   name_in('v_field_' || to_char(x) ) := 'blah'
>end loop;
>



