Home » Developer & Programmer » Forms » multiple parameter in declaration section
multiple parameter in declaration section [message #85960] Tue, 17 August 2004 07:14 Go to next message
fanni
Messages: 96
Registered: March 2004
Member
hello

BACKGROUND

decalre

cursor c1 is

select * from emp

where hiredate = := :blockname.date;

begin

PROBLEM STATEMENT

I have to open write a cusor definition on the basis of the more than one dates selected via check box.

but when i write the above mentioned definition it compares only with the date selectd in last.

How can i do it
Re: multiple parameter in declaration section [message #85965 is a reply to message #85960] Tue, 17 August 2004 23:00 Go to previous message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
Whatever your query is doing , is correct as it will comapre the date with the date in which your Cursor currently is.
What over here you require is to Prepare a list of dates as follows and then use it in your cursor:

Declare
L_string varchar2(20000):=null;
cursor c1(l_string varchar2) is
select * from emp
where hiredate in (L_string);
Begin
Begin
Go_block('blockname');
first_record;
loop
If check_box='Checked' then
L_string:=L_string||''''||:blockname.date||'''';
end if;
if :system.last_record='TRUE' then
exit;
else
next_record;
end if;
end loop;
exception
When others then
message("error while preparing select string');
end;
For i in c1(L_string) loop
--------

exception
----
end;

HTH
Regards
Himanshu
Previous Topic: doubt in forms 6i
Next Topic: need helps on error message
Goto Forum:
  


Current Time: Wed Aug 07 14:10:37 CDT 2024