function RAWTOHEX can converts rawto a character value containing its hexadecimal equivalent.
解决方案 »
- 可以不可以把建立的T_ADD114_3.DBF文件从D盘移动E盘啊?
- 这样的存储过程怎么写?利用它产生唯一主键
- 数据库和数据仓库的区别
- 如何把sql server的数据库导入Oracle中
- 基于oracle的新闻后台管理系统
- 进入oracle9i企业管理器(oracle enterprise manager console),打开本地数据库连接时,提示'关闭的连接'
- 传授新手一个技巧,我在csdn上文了很多次都没有人回答,多亏一个朋友介绍。
- orcale的数据导出
- [转载] 软件开发中的Bug跟踪管理
- jdk1.3能安装oracle8.17么?难道非要jdk1.18?
- oracle9.i安装不上的问题,请各位兄弟帮忙`~~~很急~~~~
- oracle9.i安装不上的问题,请各位兄弟帮忙`~~~很急~~~~
Application Developer’s Guide - Fundamentals
下载地址:
http://gigabase.idi.ntnu.no/oradoc/nav/docindex.htm
please read it before you ask some questions.
select * from
(select ...,rawtohex(longrawfield) as longfie from where table_name )
where instr(longfie,keywords)>0
try:
select * from
(select ...,rawtohex(longrawfield) as longfie from table_name where)
where instr(longfie,keywords)>0
select * from
(select ...,rawtohex(longrawfield) as longfie from table_name)
where instr(longfie,keywords)>0
--------------------------
where语句里面不可以包含long raw字段。
select rawtohex(doc_body) as longfie from newsdoc
:java.sql.SQLException: ORA-00997: 非法使用 LONG 数据类型
CREATE TABLE long_table (n NUMBER, long_col LONG);
CREATE TABLE lob_table (n NUMBER, lob_col CLOB);
--use this function to convert LONG to LOB values as follows: INSERT INTO lob_table
SELECT n, TO_LOB(long_col) FROM long_table;
自已自定义一个函数,然后调用它就可以了。
create function raw_to_varchar2(p_raw in long raw)
return varchar2
as
begin
return UTL_RAW.CAST_TO_VARCHAR2(p_raw);
end;
/select * from where raw_to_varchar2(longrawfield) like '%keywords%';
在当前用户任何情况都可以直接调用.
函数是创建成功了但是SQL> select * from newsdoc where raw_to_varchar2(doc_body) like '%11%';
ERROR 位于第 1 行:
ORA-00997: 非法使用 LONG 数据类型
select col1_name,col2_name,....,raw_to_varchar2(doc_body) from newsdoc where instr(raw_to_varchar2(doc_body),'11')>1;
只要把其他字段类型放到上面的函数里,就没有这样的错误了
唉,真的没办法了吗