Page 1 of 1

Bug in UnIDAC / Oracle?

Posted: Sat 29 Aug 2009 09:03
by Moehre
If I try to open this UniQuery on an oracle 10g database:

"SELECT VIEW_NAME FROM ALL_VIEWS WHERE TEXT LIKE '%MY_TABLE%'"
I get the following error:

"# ORA-00932: Inconsistent data types: got NUMBER instead of LONG"
(manually translated from german to english, so it might differ a little bit)

Is this an oracle bug or an unidac bug? Using "SELECT VIEW_NAME,TEXT FROM ALL_VIEWS WHERE ROWNUM < 2" works ok...

Greetz
Detlev Moehring

Posted: Sun 30 Aug 2009 07:13
by Moehre
:shock: OK, got it: It's an oracle bug! The same error occurs using SQLPLus!
Every query using "TEXT" field in where clause will fail ...

Thread can be closed!

Posted: Mon 31 Aug 2009 08:32
by Plash
You get this error because Oracle does not allow to use LIKE operator with columns of LONG type.

Posted: Mon 31 Aug 2009 09:01
by Moehre
But this error will occur if you don't use "LIKE" either:

SELECT VIEW_NAME FROM USER_VIEWS
WHERE TEXT = 'TEST'

will fail too!

Is there any other way looking for views that reference a specific table?

Greetz
Detlev Moehring

Posted: Wed 02 Sep 2009 08:16
by Plash
You cannot use LONG columns in WHERE.

Use USER_DEPENDENCIES view to find views that reference a specific table.