Home » SQL & PL/SQL » SQL & PL/SQL » Output sql in a loop
Output sql in a loop [message #56] Tue, 08 January 2002 14:42 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: Output sql in a loop [message #326 is a reply to message #56] Tue, 05 February 2002 15:51 Go to previous message
Abul Fazal
Messages: 39
Registered: February 2002
Member
There is nothing wrong with the format of the Statement, I mean can Update SQL based on Queries. Probably u need to check the syntax of the Sub-Query. U can start by running the Sub-Query seperately to check the syntax.
Previous Topic: Re: Oracle][ODBC][Ora]ORA-01460: unimplemented or unreasonable
Next Topic: Executing PL/SQL code from a file
Goto Forum:
  


Current Time: Mon Sep 27 05:39:18 CDT 2021