标签:function iat png 类型 rom 分享 http oracle .com
好久以前就碰过这个问题,今天找出原来写的一个函数
select b.remark,
LONG_TO_CHAR(b.rowid, null, ‘tmp20180518102050381‘, ‘remark‘)
from tmp20180518102050381 b;
CREATE OR REPLACE fUNCTION LONG_TO_CHAR(in_rowid rowid, --rowid
in_owner varchar, --所有者 可空
in_table_name varchar, --表名
in_column varchar2 --要查询的列名
) RETURN varchar AS
text_c1 varchar2(32767);
sql_cur varchar2(2000);
begin
if length(in_owner) > 0 then
sql_cur := ‘select ‘ || in_column || ‘ from ‘ || in_owner || ‘.‘ ||
in_table_name || ‘ where rowid = ‘ || chr(39) || in_rowid ||
chr(39);
else
sql_cur := ‘select ‘ || in_column || ‘ from ‘ || in_table_name ||
‘ where rowid =‘ || chr(39) || in_rowid || chr(39);
end if;
dbms_output.put_line(sql_cur);
execute immediate sql_cur
into text_c1;
text_c1 := substr(text_c1, 1, 4000);
RETURN TEXT_C1;
END;
标签:function iat png 类型 rom 分享 http oracle .com
原文地址:https://www.cnblogs.com/power255/p/9176974.html