I know there is question related to inconsistent datatypes but that comes from a query. while
I am getting this error on database side when we try to access user defined datatype on our schema that is written in some other schema.
E.g.
we are having xxxtypes schema and we have defined several UDT there. Now in our database we are using xxxtypes.employeeList, so it is throwing following error from that line.
java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected – got SYSTPzM8RTCHEUy/gQAB/AQBa6A==
EDIT:
Q :Why this error is coming ? and How to overcome this ?
Examples:
create or replace
TYPE InstalmentList IS TABLE OF InstalmentEntry;
create or replace
TYPE InstalmentEntry IS OBJECT
(
reservationinstalment_id NUMBER,
value NUMBER
);
We have created above type in xxxtypes schema, to use it for several clients.
Now for a client's database we are using it as :
SELECT
column_value AS list,
rownum AS rownumber
FROM
TABLE(
CAST(
powermultiset(
CAST(
MULTISET(
SELECT
rsv_int.reservationinstalment_id,
rsv_int.value
FROM reservationinstalment rsv_int
WHERE
rsv_int.reservation_id = p_reservation_id
AND
rsv_int.payer_type = p_payer_type
AND
rsv_int.type <> 'r'
)
AS
**xxxtypes.InstalmentList**
)
)
AS
InstalmentListList
)
)
) combinations
now xxxtypes.InstalmentList is throwing error saying that it is getting some inconsistent datatypes.
Best Answer
The type
InstalmentList
is a nested table ofInstalmentEntry
, so you need to build a set ofInstalmentEntry
objects to get the list.The following query works on 11.2: