创建存储过程select赋值给游标的问题!!!!!!!!!!!!!!!!!!!!!!!!!!!
各位大哥帮忙看看这个哪里有问题,创建无效,小弟找不出,谢谢各位哈!!!
--存储过程
Create Or Replace Procedure Proc_Link_Cc_Dba As
v_Data_Id Res_Alarm_Drive@Res_Alarm.Data_Id%Type; --流水号
v_Region_Id Res_Alarm_Drive@Res_Alarm.Region_Id%Type; --区域ID
v_Region_Name Res_Alarm_Drive@Res_Alarm.Region_Name%Type; --区域名称
v_Station_Id Res_Alarm_Drive@Res_Alarm.Station_Id%Type; --小区ID
v_Station_Name Res_Alarm_Drive@Res_Alarm.Station_Name%Type; --小区名称
v_Res_Type_Id Res_Alarm_Drive@Res_Alarm.Res_Type_Id%Type; --资源类型ID 2510
v_Res_Type_Name Res_Alarm_Drive@Res_Alarm.Res_Type_Name%Type; --资源类型 OLT设备预警
v_Res_Level Res_Alarm_Drive@Res_Alarm.Res_Level%Type; --设备等级 null
v_Res_Id Res_Alarm_Drive@Res_Alarm.Res_Id%Type; --资源ID prop_three o
v_Res_Name Res_Alarm_Drive@Res_Alarm.Res_Name%Type; --资源名称 prop_one o
v_Alarm_Total Res_Alarm_Drive@Res_Alarm.Alarm_Total%Type; --预警资源总量 prop_six o
v_Alarm_On Res_Alarm_Drive@Res_Alarm.Alarm_On%Type; --预警资源占用量 stat_value o
v_Alarm_Per Res_Alarm_Drive@Res_Alarm.Alarm_Per%Type; --预警资源占用比 stat_value o
v_Main_Region Res_Alarm_Drive@Res_Alarm.Main_Region%Type; --维护分公司 sf_get_desc_china(mnt_spec) o
v_Alarm_Tv Res_Alarm_Drive@Res_Alarm.Alarm_Tv%Type; --预警阀值 70
v_Process_State Res_Alarm_Drive@Res_Alarm.Process_State%Type; --流程状态 0 1 2 初始 处理中 归档
v_Alarm_Sw Res_Alarm_Drive@Res_Alarm.Alarm_Sw%Type; --预警开关 0 1 启用 关闭
v_Alarm_Date Res_Alarm_Drive@Res_Alarm.Alarm_Date%Type; --预警时间 prop_nine o
v_Flag Res_Alarm_Data.Alarm_Id%Type;
Cursor Cur_Items Is
Select a.Data_Id, i.Region_Id, i.Region_Name, s.Station_Id, s.China_Name, a.Prop_Three, a.Prop_One, a.Prop_Six,
a.Stat_Value,a.Stat_Value, Sf_Get_Desc_China(s.Mnt_Spec), a.Prop_Nine
From Res_Alarm_Data a, Rme_Eqp p, Spc_Room m, Spc_Station s, Spc_Region i
Where p.Posit_Id = m.Room_Id And m.Station_Id = s.Station_Id And s.Region_Id = i.Region_Id And
a.Alarm_Id = '000161010000000000000856' And a.Delete_State = '0' And a.Prop_Three = p.Eqp_Id And
a.Prop_Nine = (Select Max(Aa.Prop_Nine)
&nbs