java.sql.SQLException:ORA-06502:PL/SQL:数字或值错误:字符串缓冲区太小
ORA-06512: 在 "SYSTEM.QCBBM_GHBH", line 7
ORA-06512: 在 line 1
请高手帮忙看一下:下面是我的存储过程
create or replace procedure QCBBM_GHBH(ghbh OUT CHAR) AS
ls_maxbh_t CHAR(100);
ls_maxbh CHAR(100);
ls_max CHAR(100);BEGIN
select max(qybh) into ls_maxbh_t from hc_qychd where qybh like 'CM0%';
select max(ghbh) into ls_maxbh from hc_ghjld_t where ghbh like 'CM0%'; if ls_maxbh_t>=ls_maxbh then
ls_max:=ls_maxbh_t;
end if;
if ls_maxbh_t<ls_maxbh then
ls_max:=ls_maxbh;
end if;
if ls_maxbh_t is null then
ls_max:=ls_maxbh;
end if;
if ls_maxbh is null then
ls_max:=ls_maxbh_t;
end if;
ghbh:=trim(ls_max);
END QCBBM_GHBH;我在表中看了qybh是CHAR(11),ghbh也是CHAR(11),我再网上查过了,说是声明的变量长度短了,所以我就把ls_maxbh_t 和ls_maxbh ls_max变量从CHAR(11)该成CHAR(100)了 但是现在错误依旧,请高手帮帮我
ORA-06512: 在 "SYSTEM.QCBBM_GHBH", line 7
ORA-06512: 在 line 1
请高手帮忙看一下:下面是我的存储过程
create or replace procedure QCBBM_GHBH(ghbh OUT CHAR) AS
ls_maxbh_t CHAR(100);
ls_maxbh CHAR(100);
ls_max CHAR(100);BEGIN
select max(qybh) into ls_maxbh_t from hc_qychd where qybh like 'CM0%';
select max(ghbh) into ls_maxbh from hc_ghjld_t where ghbh like 'CM0%'; if ls_maxbh_t>=ls_maxbh then
ls_max:=ls_maxbh_t;
end if;
if ls_maxbh_t<ls_maxbh then
ls_max:=ls_maxbh;
end if;
if ls_maxbh_t is null then
ls_max:=ls_maxbh;
end if;
if ls_maxbh is null then
ls_max:=ls_maxbh_t;
end if;
ghbh:=trim(ls_max);
END QCBBM_GHBH;我在表中看了qybh是CHAR(11),ghbh也是CHAR(11),我再网上查过了,说是声明的变量长度短了,所以我就把ls_maxbh_t 和ls_maxbh ls_max变量从CHAR(11)该成CHAR(100)了 但是现在错误依旧,请高手帮帮我
FROM
(select max(qybh) BH from hc_qychd where qybh like 'CM0%'
UNION ALL
select max(ghbh) BH from hc_ghjld_t where ghbh like 'CM0%'
)
trim(max(bh))