create or replace function CheckStatus(dataflag number,flagmodel number) return number is
Result number; --判断因子是否包含某种状态,dataflag为因子标识,flagmodel为状态数据。 包含返回1,不包含返回0。 REN 2011-4-11
c varchar2(2000);
begin
select utl_raw.bit_and(Utl_Raw.cast_from_binary_integer(dataflag), Utl_Raw.cast_from_binary_integer(flagmodel)) into c from dual;
if c= Utl_Raw.cast_from_binary_integer(flagmodel) then
Result:=1;
else
Result:=0;
end if;
return(Result);
end CheckStatus;
如题
Result number; --判断因子是否包含某种状态,dataflag为因子标识,flagmodel为状态数据。 包含返回1,不包含返回0。 REN 2011-4-11
c varchar2(2000);
begin
select utl_raw.bit_and(Utl_Raw.cast_from_binary_integer(dataflag), Utl_Raw.cast_from_binary_integer(flagmodel)) into c from dual;
if c= Utl_Raw.cast_from_binary_integer(flagmodel) then
Result:=1;
else
Result:=0;
end if;
return(Result);
end CheckStatus;
如题
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货