I have a Database Package with the following definitions
type AffectedLocations_rec is RECORD
(
affectedStructureName STRUCTURES.STRUCTURE_NAME%TYPE ,
affectedFloorLevelDesc FLOOR_LEVEL_TYPE.FLOOR_LEVEL_TYPE_DESC%TYPE,
affectedFloorLevelNo ASSOC_HAZARD_AREA_LIVE.ASSOC_FLOOR_LEVEL_NO%TYPE,
affectedRoomZone ASSOC_HAZARD_AREA_LIVE.ASSOC_ROOM_ZONE%TYPE
);
type AffectedLocations_refcur is REF CURSOR return AffectedLocations_rec;
function getAffectedLocations(
i_historicLive varchar2,
i_hazardSerialNo varchar2
) return AffectedLocations_refcur;
I would really like to see the returned recordset in the Data Model as a list of fields, as though I had written something like
The reason I'm struggling to do that is because the table (theTable) can change and it seems easier to use PL/SQL in the database to cope.
I do not seem to be able to call this function, from anywhere. When in the Data Model, If I try Ref Cursor, I'm provided with a wrapper function skeleton, and my ref cursor is then not recognised as a return type if I place it as the return type of the wrapper, if I try SQL I'm told that the function is not a SELECT.
Having read the only other posts on this topic and searched the net and read the help files AND a training course manual, I am no wiser as to how to call this function. I can see the package in the database area of object navigator, but have no idea how to call it or where. I have no problem calling these things from with PL/SQL procs and functions in the database, but am lost in the Reports.
Any help, even pointers to a reference source would be much appreciated.
type AffectedLocations_rec is RECORD
(
affectedStructureName STRUCTURES.STRUCTURE_NAME%TYPE ,
affectedFloorLevelDesc FLOOR_LEVEL_TYPE.FLOOR_LEVEL_TYPE_DESC%TYPE,
affectedFloorLevelNo ASSOC_HAZARD_AREA_LIVE.ASSOC_FLOOR_LEVEL_NO%TYPE,
affectedRoomZone ASSOC_HAZARD_AREA_LIVE.ASSOC_ROOM_ZONE%TYPE
);
type AffectedLocations_refcur is REF CURSOR return AffectedLocations_rec;
function getAffectedLocations(
i_historicLive varchar2,
i_hazardSerialNo varchar2
) return AffectedLocations_refcur;
I would really like to see the returned recordset in the Data Model as a list of fields, as though I had written something like
Code:
SELECT affectedStructureName, affectedFloorLevelDesc , affectedFloorLevelNo , affectedRoomZone FROM
theTable.
The reason I'm struggling to do that is because the table (theTable) can change and it seems easier to use PL/SQL in the database to cope.
I do not seem to be able to call this function, from anywhere. When in the Data Model, If I try Ref Cursor, I'm provided with a wrapper function skeleton, and my ref cursor is then not recognised as a return type if I place it as the return type of the wrapper, if I try SQL I'm told that the function is not a SELECT.
Having read the only other posts on this topic and searched the net and read the help files AND a training course manual, I am no wiser as to how to call this function. I can see the package in the database area of object navigator, but have no idea how to call it or where. I have no problem calling these things from with PL/SQL procs and functions in the database, but am lost in the Reports.
Any help, even pointers to a reference source would be much appreciated.