ora-00932

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 make CLOB column in group by expression? Any work around?

三世轮回 提交于 2020-01-04 04:32:06
问题 I have a below query: SELECT Test_Case_Name, Test_Case_Description, Test_Case_Status, CASE WHEN Test_Case_Status = 'FAILED' THEN LISTAGG(LN.LN_BUG_ID,', ') WITHIN GROUP(ORDER BY LN.LN_BUG_ID) END AS Defect_ID FROM Test LEFT JOIN LINK LN ON LN.LN_ENTITY_ID=Test.TS_TEST_ID GROUP BY Test_Case_Name, Test_Case_Description, Test_Case_Status When I run this query, I get the error ORA-00932: inconsistent data types Expected got CLOB This is because the column Test_Case_Description is a CLOB data type

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

SELECT DISTINCT CLOB_COLUMN FROM TABLE;

孤街浪徒 提交于 2019-12-06 20:27:27
问题 I would like to find the distinct CLOB values that can assume the column called CLOB_COLUMN (of type CLOB) contained in the table called COPIA. I have selected a PROCEDURAL WAY to solve this problem, but I would prefer to give a simple SELECT as the following: SELECT DISTINCT CLOB_COLUMN FROM TABLE avoiding the error "ORA-00932: inconsistent datatypes: expected - got CLOB" How can I achieve this? Thank you in advance for your kind cooperation. This is the procedural way I've thought: -- Find

SELECT DISTINCT CLOB_COLUMN FROM TABLE;

跟風遠走 提交于 2019-12-05 00:25:35
I would like to find the distinct CLOB values that can assume the column called CLOB_COLUMN (of type CLOB) contained in the table called COPIA. I have selected a PROCEDURAL WAY to solve this problem, but I would prefer to give a simple SELECT as the following: SELECT DISTINCT CLOB_COLUMN FROM TABLE avoiding the error "ORA-00932: inconsistent datatypes: expected - got CLOB" How can I achieve this? Thank you in advance for your kind cooperation. This is the procedural way I've thought: -- Find the distinct CLOB values that can assume the column called CLOB_COLUMN (of type CLOB) -- contained in

Oracle 10g: Extract data (select) from XML (CLOB Type)

折月煮酒 提交于 2019-12-03 16:23:16
问题 I'm new in Oracle and I've - maybe trivial - a problem in a select. (I'm using Oracle 10g Express Edition). I've a DB with a field CLOB: mytab.xml This column have an XML like this: <?xml version="1.0" encoding="iso-8859-1"?> <info> <id> 954 </id> <idboss> 954 </idboss> <name> Fausto </name> <sorname> Anonimo </sorname> <phone> 040000000 </phone> <fax> 040000001 </fax> </info> I'm trying to do a 'simple' select to get, for example, the value of 'fax' tag. But I've a bit of problem and I'm not

ORA-00932: inconsistent datatypes: expected - got -

僤鯓⒐⒋嵵緔 提交于 2019-12-03 13:55:31
问题 I have been using Oracle(10g.2) as a PHP programmer for almost 3 years, but when I gave an assignment, I have tried to use the ref cursors and collection types for the first time. And I 've searched the web, when I faced with problems, and this ora-00932 error really overwhelmed me. I need help from an old hand. Here is what I've been tackling with, I want to select rows from a table and put them in a ref cursor, and then with using record type, gather them within an associative array. And

Oracle 10g: Extract data (select) from XML (CLOB Type)

假如想象 提交于 2019-12-03 05:45:17
I'm new in Oracle and I've - maybe trivial - a problem in a select. (I'm using Oracle 10g Express Edition). I've a DB with a field CLOB: mytab.xml This column have an XML like this: <?xml version="1.0" encoding="iso-8859-1"?> <info> <id> 954 </id> <idboss> 954 </idboss> <name> Fausto </name> <sorname> Anonimo </sorname> <phone> 040000000 </phone> <fax> 040000001 </fax> </info> I'm trying to do a 'simple' select to get, for example, the value of 'fax' tag. But I've a bit of problem and I'm not able to understand my error. For example: select extract(xml, '//fax').getStringVal() from mytab; ORA

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