This content has been marked as final. Show 2 replies
cimulation wrote:How about you prove this assertion with a small test case that we can run on our machines (CREATE TABLE statements and INSERT statements)?
I have a FOR Loop on a complex query with UNION ALL.
When I run the query below, I get results in the DBMS_OUTPUT from the query in underline, but I get not results from the the other query formed with the UNION ALL.
I cannot explain its behaviour. maybe I am doing something wrong. Is there a right way of doing this:
FOR ROWDET IN (SELECT C1,C2, C3, C4 ,C5 from (
SELECT C1, C2, C3,C4,C5 from TABLE A
SELECT C1, C2, C3, C4, Test OVER (PARTITION BY TestCol order by Total desc) C5 from (
SELECT C1 C2, C3, C4 ,Test, TestCol,Total from TABLE B
v_print_row := '<tr>';
v_print_row := v_print_row || '<td class=xl25>'|| ROWDET.C1||ROWDET.C2 || '</td>'||chr(10);
v_print_row := v_print_row||'</tr>';
To that end, your Oracle version would be quite important to know
select * from v$version;
From this much of information, the only thing recommended is SET SERVEROUT ON !.