-
I have a table with 2 columns.
And I have a form with these 2 columns repeating three
times with a scrollbar beside.
I have a query that returns several rows.
This query is inside a procedure and I used a cursor
for getting the result. This procedure prints the result
in the text items on the form.
The problem is: the query returns several rows and
the procedure prints just the last row of the result in
the text item. If the result contained 10 rows, I wanted
it to put the 10 rows in the text item ... not just the last
(there are three lines of text item but there's the scrollbar).
Thanks in Advance.
F.
-
-
I have two blocks (Teacher and Student). They are relationed
(master detail) through teacher.id = student.teacher.
When I push the button, the procedure below returns just
the last row of the cursor query and put it on the text item.
But this cursor returns about 10 rows and I wanted to put these rows at one time on the text items .. there are three records of text items and the scrollbar.
PROCEDURE SELECT_STAT (
p_id_teacher IN NUMBER,
p_id_student OUT NUMBER,
p_name_student OUT VARCHAR2) IS
Cursor c_REG IS Select id, name from student where teacher = p_id_prof;
BEGIN
OPEN c_REG;
FETCH c_REG INTO p_id_student, p_name_student;
LOOP
EXIT WHEN c_REG%NOTFOUND;
FETCH c_REG INTO p_id_student, p_name_student;
END LOOP;
CLOSE c_REG;
END;
And then I run inside a Push_Button Trigger:
BEGIN
SELECT_STAT(:TEACHER.ID, :STUDENT.ID, :STUDENT.NAME);
END;
Thanks for replying.
F.
-
push bottom
write
go_block('student');
execute_query;
and
on the student block
give where clause as
teacher = :TEACHER.ID
see
Solved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|