Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> output a SQL in a stored procedure on to a screen

output a SQL in a stored procedure on to a screen

From: Lance Prais <lprais_at_ts.checkpoint.com>
Date: Wed, 09 Jan 2002 06:12:31 -0800
Message-ID: <F001.003EAEC9.20020109055518@fatcity.com>

I want to output a SQL Statement inside of a Loop. If you look at the following statement you will see I am outputting the 'Solution' which it is doing but my SQL is failing. If I select the statement out and drop in the Solution into it is works.
So I want to see what SQL is being passed:

I have tried PRINT, dbms_output.put_line , dbms_output.put but none work I am not sure how else to do this.

I do have Serverout set to on also.

CODE: Begin

Open Primus_solution;

loop

fetch primus_solution into solution;
exit when primus_solution%NOTFOUND;
dbms_output.put_line (solution);

dbms_output.GET_LINES
(Update Primus_Temp_Dump set owner =
(Select c.pc_name

from pt_solution a, pt_solution_prop b,pt_member c where b.pc_owner = c.pc_secure_id
and b.pc$sol_secure_id = a.pc_secure_id
and a.pc_solution_id = 'solution')

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Lance Prais
  INET: lprais_at_ts.checkpoint.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed Jan 09 2002 - 08:12:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US