SashaBuilder3
Programmer
Hi everybody,
I am trying to work with dynamic cursors, so I wrote the following procedure (simplified version):
PROCEDURE p1 AS
TYPE TYPE_tbl_cursor IS REF cursor;
cur1 TYPE_tbl_cursor;
TYPE TYPE_row_cur1 IS RECORD
(
Smplno tbl_Carbons.Smplno%TYPE,
Q_OC tbl_Carbons.Q_OC%TYPE
};
row_cur1 TYPE_row_cur1;
SQL_str VARCHAR2(1024);
BEGIN
SQL_str:='SELECT Smplno, Q_OC FROM tbl_Carbons';
OPEN cur1 FOR SQL_str;
FETCH cur1 INTO row_cur1;
DBMS_OUTPUT.put_line(row_cur1.Smplno || ',' || TO_CHAR(row_cur1.Q_OC));
CLOSE cur1;
END;
However I get an error message when I try to compile (save) the proc in the Procedure Builder:
PDE-USW002 The source of the stored program unit source is incomplete
The main piece causing trouble is
TYPE TYPE_row_cur1 IS RECORD
(
Smplno tbl_Carbons.Smplno%TYPE,
Q_OC tbl_Carbons.Q_OC%TYPE
};
If I comment it out (with referencing it lines) it compiles OK.
I can't figure out what is wrong with this.
Can anyone help?
Thanks,
Alexandre
I am trying to work with dynamic cursors, so I wrote the following procedure (simplified version):
PROCEDURE p1 AS
TYPE TYPE_tbl_cursor IS REF cursor;
cur1 TYPE_tbl_cursor;
TYPE TYPE_row_cur1 IS RECORD
(
Smplno tbl_Carbons.Smplno%TYPE,
Q_OC tbl_Carbons.Q_OC%TYPE
};
row_cur1 TYPE_row_cur1;
SQL_str VARCHAR2(1024);
BEGIN
SQL_str:='SELECT Smplno, Q_OC FROM tbl_Carbons';
OPEN cur1 FOR SQL_str;
FETCH cur1 INTO row_cur1;
DBMS_OUTPUT.put_line(row_cur1.Smplno || ',' || TO_CHAR(row_cur1.Q_OC));
CLOSE cur1;
END;
However I get an error message when I try to compile (save) the proc in the Procedure Builder:
PDE-USW002 The source of the stored program unit source is incomplete
The main piece causing trouble is
TYPE TYPE_row_cur1 IS RECORD
(
Smplno tbl_Carbons.Smplno%TYPE,
Q_OC tbl_Carbons.Q_OC%TYPE
};
If I comment it out (with referencing it lines) it compiles OK.
I can't figure out what is wrong with this.
Can anyone help?
Thanks,
Alexandre