Home » Developer & Programmer » Forms » how to do a loop on a simple list
how to do a loop on a simple list [message #81696] Wed, 12 March 2003 07:39 Go to next message
Lionel
Messages: 3
Registered: May 2002
Junior Member
Hi,
I`m new to pl/sql and I don`t know how to do the following, can you help ?

I`d like to run a :
FOR X in ( variable1,variable2,variable2,variable3) do
begin
....
end;

In pl/sql, can you use hash ? or create array, or array within array ? To call a variable with var_array('country')[[1]] for example ?

Do you have structures like in perl, with hash1( 'country' => array1, 'customer' => array2...) ???

I am writing lots of lines, where the use of a "for X in list" will save time and lines. All I can find in the doc is about using FOR with numerical values...for x in 1..3

Is FORALL the solution ? ( how to use it in my case ? )

What i do now is :
If variable = AA then
if test(AA1)
insert into table1 values ( ...AA1.. )
insert into table2 values ( ...AA1.. )

if test(AA2)
insert into table1 values ( ...AA2..)
insert into table2 values ( ...AA2..)

if test(AA3)
insert into table1 values ( ...AA3..)
insert into table2 values ( ...AA3..)

if test(AA4)
insert into table1 values ( ...AA4..)
insert into table2 values ( ...AA4.. )
end if

if variable = BB then

if test(BB1) ...
...

Thanks for any help -
Re: how to do a loop on a simple list [message #81701 is a reply to message #81696] Wed, 12 March 2003 16:35 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
this forum is about tools
this question fits in the "sql/plsql newbies" section
since you admit you are a newbie...
how you want to be a good developer if you cant obey this simple rule...
Re: how to do a loop on a formula column [message #86467 is a reply to message #81701] Sat, 02 October 2004 03:59 Go to previous message
ajaychauhan01@yahoo.co.in
Messages: 1
Registered: October 2004
Junior Member
how to do a loop on a formula column
Previous Topic: outlook EXPRESS
Next Topic: Who Dares to Give the Solution
Goto Forum:
  


Current Time: Mon Sep 09 17:22:24 CDT 2024