ora-00997

Oracle Long Raw Problem

浪尽此生 提交于 2020-01-06 07:19:23
问题 select utl_raw.cast_to_varchar2(DCFILE) hexchar from T_FILE ORA-00997: illegal use of LONG datatype select to_char(DOC_FILE) hexchar from T_DOC_FILE ORA-00932: inconsistent datatypes: expected CHAR got LONG BINARY My column type long raw, how to make selected varchar2 ? 回答1: Oracle introduced their LOB datatypes in version 8.0, well over a decade ago. LONG and LONG RAW have been deprecated since before the Millenium (in favour of CLOB and BLOB respectively) precisely because working with

How to include the column USER_VIEWS.TEXT in a where clause

梦想与她 提交于 2019-12-19 10:36:11
问题 This seems like it should have been an easy thing to figure out but I am struggling to find any answers. I want to be able to query against the USER_VIEWS table in Oracle to find other views that are using a particular table. Something like: SELECT view_name, text FROM user_views WHERE text LIKE'%MY_TABLE%' I get the error: ORA-00932: inconsistent datatypes: expected NUMBER got LONG The datatype for TEXT is LONG and in TOAD it shows WIDEMEMO. I have tried casting it, to_char and concatenating

Get the LENGTH of a LONG RAW

扶醉桌前 提交于 2019-12-17 09:54:02
问题 I have a table with a column of data type LONG RAW . How do I determine the size (in bytes) of the data in this column? If I call the LENGTH function on it, it raises ORA-00932: inconsistent datatypes: expected NUMBER got LONG BINARY . Just in case you think it: UTL_RAW.LENGTH raises ORA-00997: illegal use of LONG datatype :) (Yes, I know LONG RAW is deprecated - the question came up due to some old software that might require it) 回答1: I don't think it's possible to manipulate LONG RAWs

Illegal use of LONG datatype Oracle

淺唱寂寞╮ 提交于 2019-12-02 00:50:31
问题 this is my firt question here I have a problem trying to convert a table column (long raw) to a base 64 string, this column contains some of the employees pictures. This is the query, the field that i'm trying to convert is f.fot_empl : SELECT e.NOM_EMPL First_name, APE_EMPL Last_name, e.NOM_EMPL || ' ' || e.APE_EMPL Full_name, car.NOM_CARG position, COS.NOM_CCOS Area, f.fot_empl Picture, E.FEC_NACI Birth_date FROM EMPLE e INNER JOIN CONTR c ON E.COD_EMPL = C.COD_EMPL INNER JOIN cargo car ON

Illegal use of LONG datatype Oracle

此生再无相见时 提交于 2019-12-01 20:25:02
this is my firt question here I have a problem trying to convert a table column (long raw) to a base 64 string, this column contains some of the employees pictures. This is the query, the field that i'm trying to convert is f.fot_empl : SELECT e.NOM_EMPL First_name, APE_EMPL Last_name, e.NOM_EMPL || ' ' || e.APE_EMPL Full_name, car.NOM_CARG position, COS.NOM_CCOS Area, f.fot_empl Picture, E.FEC_NACI Birth_date FROM EMPLE e INNER JOIN CONTR c ON E.COD_EMPL = C.COD_EMPL INNER JOIN cargo car ON C.COD_CARG = CAR.COD_CARG INNER JOIN CCOST cos on COS.COD_CCOS = C.COD_CCOS LEFT JOIN FOEMP f --

How to include the column USER_VIEWS.TEXT in a where clause

笑着哭i 提交于 2019-12-01 09:40:33
This seems like it should have been an easy thing to figure out but I am struggling to find any answers. I want to be able to query against the USER_VIEWS table in Oracle to find other views that are using a particular table. Something like: SELECT view_name, text FROM user_views WHERE text LIKE'%MY_TABLE%' I get the error: ORA-00932: inconsistent datatypes: expected NUMBER got LONG The datatype for TEXT is LONG and in TOAD it shows WIDEMEMO. I have tried casting it, to_char and concatenating. I tried creating another table with just the TEXT data and I get ORA-00997: illegal use of LONG

Get the LENGTH of a LONG RAW

∥☆過路亽.° 提交于 2019-11-27 09:18:00
I have a table with a column of data type LONG RAW . How do I determine the size (in bytes) of the data in this column? If I call the LENGTH function on it, it raises ORA-00932: inconsistent datatypes: expected NUMBER got LONG BINARY . Just in case you think it: UTL_RAW.LENGTH raises ORA-00997: illegal use of LONG datatype :) (Yes, I know LONG RAW is deprecated - the question came up due to some old software that might require it) Vincent Malgrat I don't think it's possible to manipulate LONG RAWs longer than 32k in PLSQL. Here is a java procedure that returns the length of a LONG RAW. First,