Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL formatting output question
I have never used PL/SQL for formatting output for a "regular" report. In
attempting to use it now am having difficulty seeing how to get the "single
record" at a time for dbms_output.put_line. In this instance I would like
to have two lines output for every record occurance, thus:
<begin code fragment>
set echo off
set serveroutput on
set line 132
set feedback off
--
DECLARE
v_name VARCHAR(30);
v_supplierno VARCHAR(6);
BEGIN
select name,supplierno into v_name,v_supplierno
from suppliers
where status != 'X';
dbms_output.put_line (v_name);
dbms_output.put_line (v_supplierno);
END;
/
set serveroutput off
set feedback on
<end code fragment>
Now obviously this code will attempt to retrieve all the records at once instead of a record at a time to the dbms_output line. So what is the correct way to accomplish this single record at a time situation? I feel like an idiot that it must be right in front of my face and I don't see it.
TIA
Jim
Received on Thu Dec 16 1999 - 16:20:30 CST
![]() |
![]() |