| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Assigning a record to a ref cursor?
My code is below.. I am basically trying to a assing a variable of record type '%rowtype' to a cursor.. I don't really know how to do it..Anybody have any Ideas..??
Thanks
(Look for the >>>>>>'s)
ERROR_CURSOR RET_CURSOR;
ERROR_REC TBLPESPERROR%ROWTYPE;
BEGIN
IF LENGTH(ERROR_ID#) != NULL THEN
OPEN ERROR_CURSOR FOR
SELECT * FROM TBLPESPERROR WHERE ERROR_ID = ERROR_ID#;
ELSE
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>Beginning of problem
ERROR_REC.ERROR_ID := 0;
ERROR_REC.SQL_CODE := -999;
ERROR_REC.SQL_ERRM := 'No ERROR_ID was sent to the
procedure FETCH_ERROR';
ERROR_REC.CURRDATETIME := SYSDATE;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
End of problem
END IF;
IO_CURSOR := ERROR_CURSOR;
![]() |
![]() |