Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ORA-00932: inconsistent datatypes: expected - got -; oracle 9i bug???

ORA-00932: inconsistent datatypes: expected - got -; oracle 9i bug???

From: Dale <dalesingh_at_gmail.com>
Date: 18 Apr 2006 15:26:19 -0700
Message-ID: <1145399179.332980.255920@i39g2000cwa.googlegroups.com>


Hi,

I'm getting an "ORA-00932: inconsistent datatypes: expected - got -" message with the pl/sql code at the bottom. This is just an over simplication of the original query that was generating the message. Turns out that when "test_view" is used twice in the query, the oracle exception occurs.

We had to put the "CAST(...)" in as a work around to a bug that was finally fixed in 10g release 2. So is this another bug in 9i? The code works fine in 10g release 2. Does anyone know of a work around other that using multiple with blocks or repeating the view multiple times?

Thanks,

Dale

/** CREATE TYPE NUMERIC_ID_TABLE_TYPE AS TABLE OF NUMBER(9) **/ declare

	   cursor c1(arg1 numeric_id_table_type) is
		   with test_view as
		   (
		   		select * from table(cast(arg1 as numeric_id_table_type))
		   )
		   select * from test_view union select * from test_view;
	   var1 number(9);
begin
	 open c1(numeric_id_table_type(1, 2, 3, 4, 5));

	 fetch c1 into var1;

	 while c1%found loop
	 	   dbms_output.put_line('var1 = ' || var1);
		   fetch c1 into var1;
	 end loop;
	 
	 close c1;

end; Received on Tue Apr 18 2006 - 17:26:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US