Can't copy selected records to another block [message #546425] |
Tue, 06 March 2012 12:15 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/9d3a737834daa8c057331fef1633aed5?s=64&d=mm&r=g) |
baliberde
Messages: 201 Registered: January 2012 Location: outer space
|
Senior Member |
|
|
Hi everyone, I have 2 blocks, namely addsubject3rd and chosensubjects. I'm copying the selected records(this comes with checkboxes) from the 1st block to the second block. But what happened is that it copied all the records that are on the addsubject3rd. How can I copy only selected records(checkboxes) from addsubject3rd block to chosensubjects blocks?
|
|
|
|
Re: Can't copy selected records to another block [message #546458 is a reply to message #546453] |
Tue, 06 March 2012 15:26 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/9d3a737834daa8c057331fef1633aed5?s=64&d=mm&r=g) |
baliberde
Messages: 201 Registered: January 2012 Location: outer space
|
Senior Member |
|
|
My code here:
go_block('ADDSUBJECT3RD');
first_record;
GO_BLOCK('CHOSENSUBJECTS');
first_record;
LOOP
IF :ADDSUBJECT3RD.SELECTED3RD = 'Y' THEN
:CHOSENSUBJECTS.Subj := :ADDSUBJECT3RD.subj_code3rd;
:CHOSENSUBJECTS.STIME := :ADDSUBJECT3rd.stime;
:CHOSENSUBJECTS.ETIME := :ADDSUBJECT3RD.ETIME;
:CHOSENSUBJECTS.DAY := :ADDSUBJECT3RD.DAY3RD;
:CHOSENSUBJECTS.SECTION := :ADDSUBJECT3RD.SECTION3RD;
END IF;
go_block('ADDSUBJECT3RD');
IF :system.last_record != 'TRUE' THEN
--More records to go so move to the next record in both blocks.
next_record;
go_block('CHOSENSUBJECTS');
next_record;
ELSE
--Done all records, exit loop
EXIT;
END IF;
END LOOP;
GO_BLOCK('CHOSENSUBJECTS');
first_record;
END;
but it's just keep executing the whole records not those selected ones by my checkbox
[Updated on: Tue, 06 March 2012 15:39] Report message to a moderator
|
|
|
|
Re: Can't copy selected records to another block [message #546461 is a reply to message #546459] |
Tue, 06 March 2012 16:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
owais_baba
Messages: 289 Registered: March 2008 Location: MUSCAT
|
Senior Member |
|
|
Mr baliberde once again gonna tell u its not an issue what ever is your topic its quite easy pls concentrate what ever cokiemonster is saying just see how this code is working
------very simple example--for---u----
GO_BLOCK('B');
clear_block(no_commit);
declare
cursor c1 is
select * from a WHERE NO=:A.NO ;
a_record c1%rowtype;
begin
open c1;
loop
fetch c1 into a_record;
exit when c1%notfound;
IF :A.CHK='Y' THEN
:b.no:=a_record.no;
:b.name:=a_record.name;
next_record;
ELSE -----its upto---You
-----what ever u wanna do-----------------
MESSAGE('YOUR CHECK BOX IS UN-CHECKED');
MESSAGE('YOUR CHECK BOX IS UN-CHECKED');
GO_BLOCK('A');
END IF;
end loop;
close c1;
end;
first_Record;
hope this time u will learn from cookiemonster and littlefoot they are a good teachers believe me
best regards
[Updated on: Tue, 06 March 2012 16:14] Report message to a moderator
|
|
|
|