create or replace package ItemsPkg as
type mycursor is ref cursor;
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor);
end ItemsPkg;
create or replace package body ItemsPkg as --报错PLS-00103:Encountered the symbol"create"
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor) is
begin
open my_cursor for
select '601',BASEINFO_601
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_601 is not null
union all
select '602',BASEINFO_602
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_602 is not null
union all
select '603',to_char(BASEINFO_603)
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_603 is not null;
end GetBasInfoItems;
end ItemsPkg;
type mycursor is ref cursor;
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor);
end ItemsPkg;
create or replace package body ItemsPkg as --报错PLS-00103:Encountered the symbol"create"
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor) is
begin
open my_cursor for
select '601',BASEINFO_601
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_601 is not null
union all
select '602',BASEINFO_602
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_602 is not null
union all
select '603',to_char(BASEINFO_603)
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_603 is not null;
end GetBasInfoItems;
end ItemsPkg;
type mycursor is ref cursor;
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor);
end ItemsPkg;
/create or replace package body ItemsPkg as
...
create or replace package ItemsPkg as
type mycursor is ref cursor;
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor);
end ItemsPkg;
执行一下该文件。
然后把包头替换成包体
create or replace package body ItemsPkg as --报错PLS-00103:Encountered the symbol"create"
procedure GetBasInfoItems(CPhoneNumber IN cs.info.dn%type,
BillCycle IN cs.info.billing_cycle%type,
my_cursor OUT mycursor) is
begin
open my_cursor for
select '601',BASEINFO_601
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_601 is not null
union all
select '602',BASEINFO_602
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_602 is not null
union all
select '603',to_char(BASEINFO_603)
from info
where DN=CPhoneNumber and BILLING_CYCLE=BillCycle and BASEINFO_603 is not null;
end GetBasInfoItems;
end ItemsPkg;
再执行一下?
我现在这样执行就不报错了。如果要放在一起执行,是不是就要加上"/"?可是报如上的错误啊