0

I am writing a PL/SQL stored procedure using Toad in Eclipse. I have it working just fine and the procedure is below:

CREATE OR REPLACE PROCEDURE crl_sync
IS

    unit_separator CONSTANT char:= CHR(31);
    record_separator CONSTANT char:= CHR(30);

    CURSOR c_bc is
        SELECT m.barcode, s.id, s.tracking_tags 
        FROM model m, sample s 
        WHERE m.id = s.id;
        r_bc c_bc%ROWTYPE;

BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    DBMS_OUTPUT.PUT_LINE('--CRL_SYNC--');
    OPEN c_bc;
    LOOP
        FETCH c_bc into r_bc;
        EXIT WHEN c_bc%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE('barcode = '||r_bc.barcode);
    END LOOP;
    CLOSE c_bc;
END;
/

It compiles and executes just fine; note the DBMS_OUTPUT.ENABLE line and the put_line at the start to rule out a problem with the query but still nothing in the toad window in Eclipse. Can someone please provide a pointer as to what I'm doing wrong here?

Thanks.

Neil Benn
  • 904
  • 1
  • 12
  • 31

1 Answers1

1

[To show this question as answered]

Try the recommendation on this page:

There are two editors for Oracle, called "SQL Worksheet" and "Stored Procedure Editor", you can open them with icons in the Connections View. DBMS Output view works with SQL WORKSHEET. So, go to the DBMS output view and enable it with the "bulb" icon. Now, open the SQL Worksheet.

Jon Tofte-Hansen
  • 794
  • 6
  • 16