首先看我的oracle数据包
其次包的主体实现:
create
or
replace
package Pkg_GetQuery
is
-- Author : ZM
-- Created : 2007-12-12 19:38:22
-- Purpose :
-- Public type declarations
type Cur_Ref is ref cursor ;
Procedure Proc_GetQueryStudinfo(strkey varchar2 ,cur_Result out Cur_Ref);
end Pkg_GetQuery;
-- Author : ZM
-- Created : 2007-12-12 19:38:22
-- Purpose :
-- Public type declarations
type Cur_Ref is ref cursor ;
Procedure Proc_GetQueryStudinfo(strkey varchar2 ,cur_Result out Cur_Ref);
end Pkg_GetQuery;
create
or
replace
package body Pkg_GetQuery
is
-- Private type declarations
procedure Proc_GetQueryStudinfo(strkey varchar2 ,cur_Result out cur_Ref)
is
strsql varchar2 ( 1000 );
begin
strsql: = ' select * from StudInfo Where StudName Like ''' || strkey || ' % ''' ;
Open Cur_Result For StrSql; /*
-- Private type declarations
procedure Proc_GetQueryStudinfo(strkey varchar2 ,cur_Result out cur_Ref)
is
strsql varchar2 ( 1000 );
begin
strsql: = ' select * from StudInfo Where StudName Like ''' || strkey || ' % ''' ;
Open Cur_Result For StrSql; /*