|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Help with Buffer size overflow
Im trying to run this code bt I keep getting errors, can't figure it out? Does any have and ideas why? Thank you in advance.
----------------- set serveroutput on size 1000000 DECLARE V_SALESREPS DEPT.DNAME%TYPE; CURSOR C_SALES IS SELECT W.WORKERID, W.LNAME, W.GENDER, W.SALARY, W.COMMISSION, D.DNAME, B.BNAME FROM WORKER W, DEPT D, BRANCH B WHERE W.COMMISSION IS NOT NULL AND D.DEPTID = W.DEPTID AND B.BRANCHID = D.BRANCHID AND D.DNAME ='V_SALESREPS'; V_SALES C_SALES%ROWTYPE; BEGIN V_SALESREPS := 'SALES'; OPEN C_SALES; LOOP FETCH C_SALES INTO V_SALES; DBMS_OUTPUT.PUT_LINE(V_SALES.WORKERID); END LOOP; CLOSE C_SALES; EXCEPTION /*Pre-defined exceptions*/ WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20030, 'Warning: No records were found.'); WHEN TOO_MANY_ROWS THEN RAISE_APPLICATION_ERROR(-20040, 'Error: Too many rows were returned by the SELECT...INTO statement.'); WHEN INVALID_CURSOR THEN RAISE_APPLICATION_ERROR(-20050, 'Error: The cursor has already been closed.'); WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('An unknown fatal error occurred.'); END; / ------ I keep getting the buffor overrun errors, and erros for putline. Any ideas? |
|
#2
|
|||
|
|||
|
Hi There,
Oracle on supports 1mb output and your query obviously surpasses the quota. Look at writing to a temp table then using sqlplus or look at using UTL_FILE instead Regards Chris |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Help with Buffer size overflow |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|