Re: PL/SQL cursor trouble

From: Ian A. MacGregor <ian_at_tethys.SLAC.Stanford.EDU>
Date: Tue, 23 Mar 1993 15:36:52 GMT
Message-ID: <C4CM1I.6rJ_at_unixhub.SLAC.Stanford.EDU>


In article <1omodc$85v_at_nz12.rz.uni-karlsruhe.de>, rz34_at_hp850.rz.uni-karlsruhe.de (Schillinger) writes:
|> Background: Oracle v.6.0.34.2.1
|> PL/SQL v. 1.0.34.0.1
|> HP/UX 9000 Series 800
|>
|> I'm working on my first PL/SQL script which should merely produce a
|> listing of data joined from several tables. I've been using all the
|> handbooks, but can't find the solution to a probably simple problem:
|>
|> I'm not getting any output on my screen.
|>
|> I assume this is because I'm not telling Oracle to give me any,
|> but how DO I tell it to do so???
|>
|> Because I want a listing of all data, I've created a cursor,
|> "name_list_cursor", and use the FETCH... INTO statement in a loop,
|> as described in the PL/SQL handbook. I think I need something else
|> in the loop to display the list, but what??
|>
|> (TERMOUT is turned off at the beginning, but turned on again before the
|> column formatting.)
|>
|> I tried SPOOL filename; but it didn't like that (gave me the message
|> that it was expecting ":=" or some other symbol before "filename").
|>
|> Following is the script (it's not terribly long).
|>
|> Oh! Another question, could I be getting trouble
|> from my "Group by" and/or "Order by" in my cursor? I wasn't sure if that
|> was allowed, but I found nothing to the contrary. (The "Group By" is
|> the reason for the Max() around all the columns in the cursor's Select
|> statement, by the way.)
|>
|> Does anyone have any advice or ideas??
|> Thanks in advance,
|> Karen Schillinger
|> Schillinger_at_rz.uni-karlsruhe.de
|> <pl/sql program deleted>

PL/SQL has no output capabilities in Version 6 and very limited ones in Version 7. You must populate a table with your program, and then select the rows from the table in order to produce output.

                            Ian MacGregor
                            Stanford Linear Accelerator Center
                            (415) 926-3528
Received on Tue Mar 23 1993 - 16:36:52 CET

Original text of this message