Home » Developer & Programmer » Forms » Assign multiple values to variables (10g)
icon5.gif  Assign multiple values to variables [message #549506] Sat, 31 March 2012 07:43 Go to next message
Messages: 34
Registered: March 2012
Location: london
having a little trouble with assigning values to a particular variable that i need for my button trigger. I Understand that you can assign multiple values to a variable that has a varchar or char data type....
is there a way to assign multiple values to a variable that has a 'number' data type?? I need this for my 'where' clause
	usergrade varchar(4) := 'pass';
	user_unitcode number(6) := ;--needs three unit codes to equal pass
Re: Assign multiple values to variables [message #549507 is a reply to message #549506] Sat, 31 March 2012 08:19 Go to previous message
Messages: 21128
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Varying elements in IN list on AskTom might be what you are looking for.

If you read the whole discussion, you'll probably find a global temporary table (GTT) solution of the problem, i.e. you'd insert these values into a GTT and use it in your WHERE clause as
-- insert some records into a GTT
insert into gtt (id) values (1);
-- or possibly
insert into gtt (id) values (:form_block.some_item);

-- now use them in WHERE clause:
select ...
from some_table
where id in (select id from gtt)
  and ...
Previous Topic: Java timeout connection Error
Next Topic: Connect using proxy user
Goto Forum:

Current Time: Mon Jul 24 08:05:56 CDT 2017

Total time taken to generate the page: 0.05673 seconds