deleting record from checkbox selection [message #124639] |
Mon, 20 June 2005 13:14 |
insomniius
Messages: 20 Registered: June 2005 Location: pakistan
|
Junior Member |
|
|
i hve four options in the control block field.
say a,b,c,d with 4 check boxes and against everyfield, the user has further options to select values against a,b,c,d lets say 'xyz' and 'qwe' for a n b respectively n same for c n d there r some values to b chosen through 4 poplists....
i want that the data block retuens the record on the basis of the check box checked and then the respective values as well...
if user checks a and select 'xyz'...data block shud return the data where a='xyz', if user checks a and b, n then selects respective values again each check box from pop list, data block returns daa where a='xyz'and b='qwe'...if the user checks 3 then bring data checking 3 conditions, and if checks only c and d then brings date against the values selected again c and d only
i hope i wud hve conveyed my logic...
|
|
|
|
dynamic query for different chekbox selection [message #124699 is a reply to message #124639] |
Mon, 20 June 2005 23:39 |
insomniius
Messages: 20 Registered: June 2005 Location: pakistan
|
Junior Member |
|
|
I hve four check boxes…
A
B
C
D
Hve three or four options against each checkbox…lets say we hve
For A: alpha,bravo, Charlie ( in the pop list )
For B: moya, federer, roddick,nadal
For C: it, productions, machinery,equipment
For D: complete, incomplete, initiated
Now I want to dynamically build a where clause…so that if I select check box B n C, data block brings data matching these fields…if I check B, C, D… data block brings data matching these fields….if I check only D…. data block brings data matching this field…
I hope the logic is clear…
|
|
|
Re: dynamic query for different chekbox selection [message #124712 is a reply to message #124699] |
Tue, 21 June 2005 01:12 |
|
rajavu1
Messages: 1574 Registered: May 2005 Location: Bangalore , India
|
Senior Member |
|
|
Salam for insomniius
Can U try like this....(here table is emp)
SQL> create or replace procedure test_1(
2 en number default null,
3 sl number default null ) is
4 type rfcur is ref cursor;
5 rf rfcur;
6 str varchar2(500);
7 em1 emp%rowtype;
8 begin
9 str :='select * from emp ';
10 if en is not null or sl is not null then
11 str :=str||' where ';
12 if en is not null then
13 str := str||' empno= '||en||' and ';
14 end if;
15 if sl is not null then
16 str:=str||' sal ='||sl||' and ';
17 end if;
18 str := rtrim(str,' and ');
19 end if;
20 OPEN rf for str;
21 loop
22 fetch rf into em1;
23 exit when rf%notfound;
24 dbms_output.put_line(em1.ename);
25 end loop;
26 end;
27 /
with rgrds from India
Rajuvan
[Updated on: Tue, 21 June 2005 01:16] Report message to a moderator
|
|
|
|
deleting records from checkbox selection [message #124733 is a reply to message #124639] |
Tue, 21 June 2005 03:03 |
insomniius
Messages: 20 Registered: June 2005 Location: pakistan
|
Junior Member |
|
|
I hve the following case…..
I hve retrieved the data in the data block….i hve say 8 records in the block each record hving checkbox…
I want the user checks the records he wants to delete and then press the delete button…and the record against that specific checkbox deletes n when the user again query the data, or when the block refreshes, the deleted records r not there…
This is same as when we check the mails we want to delete and then press the delete button n all the checked emails r deleted…
How to record will b mapped against the checkbox???
|
|
|
deleting record from checkbox selection [message #124734 is a reply to message #124639] |
Tue, 21 June 2005 03:06 |
insomniius
Messages: 20 Registered: June 2005 Location: pakistan
|
Junior Member |
|
|
I hve the following case…..
I hve retrieved the data in the data block….i hve say 8 records in the block each record hving checkbox…
I want the user checks the records he wants to delete and then press the delete button…and the record against that specific checkbox deletes n when the user again query the data, or when the block refreshes, the deleted records r not there…
This is same as when we check the mails we want to delete and then press the delete button n all the checked emails r deleted…
How to record will b mapped against the checkbox???
|
|
|
Re: deleting record from checkbox selection [message #124737 is a reply to message #124734] |
Tue, 21 June 2005 03:23 |
|
Barbara Boehmer
Messages: 9097 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
Four questions have been merged here from three different forums. Please post each question only once in only one forum and do not cross-post. Future duplicates may be deleted. Forms questions belong in the forms forum. If in doubt as to which forum to post in, then pick the one that you think is most appropriate. If it belongs in another forum, we can move it.
|
|
|