Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> No output w. DBMS_OUTPUT.PUT_LINE (within SQL*Plus)
My script below is NOT outputting any text
to SQL*Plus, w. DBMS_OUTPUT.PUT_LINE w. NO
errors either.
What is the problem?
SQL>DECLARE
tempTotal NUMBER;
FUNCTION orderTotal(orderId IN INTEGER)
RETURN NUMBER
IS
orderTotal NUMBER; tempTotal NUMBER; BEGIN SELECT SUM(i.quantity * p.unitprice) IN FROM practice04.items i, practice04. WHERE i.o_id = orderId AND i.p_id = p.id GROUP BY i.o_id; RETURN orderTotal;
DBMS_OUTPUT.PUT_LINE('Order 1 Total: ' tempTotal := orderTotal(2); DBMS_OUTPUT.PUT_LINE('Order 2 Total: 'END;
SQL procedure successfully completed.
SQL> Received on Mon Oct 28 2002 - 12:04:13 CST