Home » SQL & PL/SQL » SQL & PL/SQL » outout a SQL Statment to the screen
outout a SQL Statment to the screen [message #36977] Tue, 08 January 2002 14:51 Go to next message
Lance Pris
Messages: 40
Registered: January 2002
Member
I want to output a SQL Statement inside of a Loop. If you look at the following statment you will see I am outputing the 'Solution' which it is doing but my SQL is failing. If I select the statment out and dfrop 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.

dbms_output.put_line (solution);

Update Primus_Temp_Dump set owner =(
Select c.pc_name /*owner*/
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')
Re: outout a SQL Statment to the screen [message #36979 is a reply to message #36977] Tue, 08 January 2002 17:15 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
run this command before executing script..

SQL> set serveroutput on

declare

solution varchar2(10):='XYZ';
begin
dbms_output.put_line (solution);

Update Primus_Temp_Dump set owner =(
Select c.pc_name /*owner*/
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);
end;
/
Previous Topic: Help with a indifinate loop
Next Topic: raw datatype
Goto Forum:
  


Current Time: Sat Aug 15 06:43:15 CDT 2020