Wednesday, August 11, 2010

A template script for debuging PL/SQL procedures

When I get used to the convenience of Eclipse JDT, I can't stand for the awkwardness of Oracle PL/SQL and its IDE. Switching between today's technology and technology from 20 years ago is really a pain. So here is a script template to relief the pain a little bit.

SET serveroutput ON;
DECLARE
ai_instanceid NUMBER;
v_return curType;
rec recType;
BEGIN
ai_instanceid := 5000606;
v_return := plsql_pkg.getparameters(ai_instanceid);
LOOP
FETCH v_return INTO rec;
EXIT
WHEN v_return%notfound;
dbms_output.put_line(rec.portfolionm || ' ' || rec.templateid || ' ' || rec.statementenddt);
END LOOP;
CLOSE v_return;
END;

No comments:

Post a Comment