Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor

Status
Not open for further replies.

josephtauro

Programmer
May 14, 2001
5
DECLARE
str1 varchar2(100);
str2 varchar2(100);
str3 varchar2(100);
statemen varchar2(100);
type rectype is record (a ErrorLog.Error_id%type,b ErrorLog.time_stamp%type, c ErrorLog.file_name%type,d ErrorLog.parameter%type,e ErrorLog.error_code%type,f ErrorLog.procedure_id%type,g ErrorLog.description%type);
type ctype is ref cursor return rectype;
m ctype;
BEGIN
str1:='Select * ';
str2:='from ';
str3:='errorlog;';
statemen:=str1||str2||str3;
dbms_output.put_line(statemen);
open m for statemen;
END;

ORA-06550: line 15, column 6: PLS-00455: cursor 'M' cannot be used in dynamic SQL OPEN statement ORA-06550: line 15, column 1: PL/SQL: Statement ignored
 
You may use only weakly typed cursors for dynamic opening. Of course, you may later fetch it into rectype variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top