Skip to content
Advertisement

How compare NUMBER with ‘TYPE IS TABLE OF NUMBER’?

I have query, where need select ID and name by ID. First I check the ID using the function. In the function, I get several values ​​that need to be compared with the ID. When I make a check it gives an error: ORA-00932: inconsistent datatypes: expected NUMBER got ARRAY

This query:

Type which I use for save values from function:

How right compare NUMBER and TYPE ARRAY?

Advertisement

Answer

Use the MEMBER OF operator:

(You can also use an INNER JOIN rather than using Oracle’s legacy comma join syntax)

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement