Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> (Newbie) - how do I display output?
Hi all,
I have finally gritted my teeth and promised myself that I am going to learn Oracle properly. I am a newbie (though with db experience, primarily SQL Server and Interbase/Firebird).
I have purchased "Beginning Oracle Programming" (Dillon, Beck and Kyte) and have started to work through it. Also have Effective Oracle by Design (Kyte) which will be next (Book recemmendations welcome!).
I started with this example
begin
for cur1 in (select sal from emp)
loop
dbms_output.put_line(cur1.sal ||' is the salary');
end loop;
end;
/
and when I run it SQL Plus says
PL/SQL procedure successfully completed.
But there is no sign of the output. I would like to see the output in my SQL Plus window as per the example in the book.
Also, when I try 'host dir', the screen goes black and then pops back into SQL Plus without my being able to read any of the filenames - I would like to be able to do this also.
I tried changing the SPOOL and PAUSE parameters but that doesn't seem to have worked.
Any hints and/or explanations appreciated. System configuration as per sig. TIA.
Paul...
p.s. what happens if you have SPOOL set to ON but no filename associated with it?
-- plinehan y_a_h_o_o and d_o_t com W2K Pro - Oracle 9.2.0.1.0 Please do not top-post.Received on Tue Mar 01 2005 - 08:38:03 CST