ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 對RobotManagement表操作的包(9)

對RobotManagement表操作的包(9)

原创 Linux操作系统 作者:huangbin7097 时间:2013-01-22 17:14:32 0 删除 编辑

CREATE OR REPLACE  PACKAGE AlexMonitor.PKG_RobotManagement
AS
   TYPE cursorref is ref cursor;
   PROCEDURE GetStationsByRobotID( robotID in AlexMonitor.RobotManagement.Robot_ID%type, out_var out cursorref);

  
end PKG_RobotManagement;

CREATE OR REPLACE  PACKAGE BODY AlexMonitor.PKG_RobotManagement
    AS
    PROCEDURE GetStationsByRobotID( robotID in AlexMonitor.RobotManagement.Robot_ID%type, out_var out cursorref)
      IS
    BEGIN
        Open out_var for select
        Station_ID,
        Robot_ID,
        STATION.TestStation_ID,
        TESTSTATION.TESTSTATION_NAME,
        Station_Name,
        Station_IP,
        Station_Mac_Addr,
        Staion_Type
    From AlexMonitor.STATION  JOIN  ALEXMONITOR.TESTSTATION   ON  STATION.TestStation_ID= TESTSTATION.TestStation_ID  where STATION.ROBOT_ID = robotID;
    EXCEPTION WHEN NO_DATA_FOUND THEN
        RAISE_APPLICATION_ERROR(-10000,'No data found, Please change the condition!');
    End  GetStationsByRobotID;
   
END PKG_RobotManagement;
     

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26851211/viewspace-753061/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-04-04

  • 博文量
    59
  • 访问量
    65956