|
--------------------------------------------------------
--AAAY50 AAG AAAACL AAA
--1,6 7,3 10,6 16,3
--处理rowid
create or replace procedure v_oprowid(v_rowid in varchar2)
as
v_dataid varchar2(6);
v_rfileid varchar2(3);
v_blockid varchar2(6);
v_xingid varchar2(3);
v_all varchar(32);
v_chk number;
v_temp number;
v_temp64 number default 0;
begin
select substr(v_rowid,1,6),substr(v_rowid,7,3),substr(v_rowid,10,6),
substr(v_rowid,16,3) into v_dataid,v_rfileid,v_blockid,v_xingid from dual;
--dbms_output.put_line('objecct_id:'||v_dataid||',rfileid:'
--||v_rfileid||',blockid:'||v_blockid||',xingid:'||v_xingid);
for i in 1..6 loop
v_temp:=ascii(substr(v_dataid,i,1));
v_chk:= v_temp-65;
if v_chk>=0 and v_chk =-17 then
v_temp64 :=v_temp64+(v_chk+69)*power(64,6-i);
end if;
if v_chk >=32 and v_chk=0 and v_chk =-17 then
v_temp64 :=v_temp64+(v_chk+69)*power(64,3-i);
end if;
if v_chk >=32 and v_chk=0 and v_chk =-17 then
v_temp64 :=v_temp64+(v_chk+69)*power(64,6-i);
end if;
if v_chk >=32 and v_chk=0 and v_chk =-17 then
v_temp64 :=v_temp64+(v_chk+69)*power(64,3-i);
end if;
if v_chk >=32 and v_chk |
|
|