|
-
Hrm all you want to do is print rows if they exist? Can't you just spool the sql query in SQL*Plus?
But either way, if all you want to do is load a query and print what is inside, this is a little easier.
<font face="courier">
declare
cursor c1 is
select c.id, c.name
from catc
where child_count != (select count(child_Cat_id)
where r.parent_Cat_id = c.id
group by parent_Cat_id;
begin
for rec in c1 loop
dbms_output.put_line ('id = ' || rec.id);
dbms_output.put_line ('name = ' || rec.name);
end loop;
end;
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
|