declare
cursor c_name is select ...;
begin
open c_name;
fetch c_name into ...;
...
clese c_name;
end;
/

解决方案 »

  1.   

    我的问题是如下:Def_Data.Cursor_Type ???
    这是别人的存储过程,那个Def_Data.Cursor_Type从何而来,是类型么?
    如果不是,可以定义游标类型,然后再使用么?不明白  Procedure Get_Location_User(V_Node_Id Number,V_Location_Id Number,V_Cur In Out Def_Data.Cursor_Type)
           Is
                  V_Sql           Varchar2(4000);
           Begin
              V_Sql := V_Sql||'      Select Distinct a.User_Id,a.First_Name||''''||Chr(32)||''''||a.Last_Name User_Name';
              V_Sql := V_Sql||'         From Cpm_User_Node_Role c,Cpm_User a,Cpm_Location_User b';
              V_Sql := V_Sql||'       Where b.Company_Id = 1';
              V_Sql := V_Sql||'         And b.Location_Id = :V_Location_Id';
              V_Sql := V_Sql||'         And c.Node_Id = :V_Node_Id';
              V_Sql := V_Sql||'         And c.User_Id =a.User_Id';
              Open V_Cur For V_Sql Using V_Location_Id,V_Node_Id;
           End;
      

  2.   

    你的程序里面应该有Def_Data这样一个包,或者type
    自己找找把