0

I am trying to do a query in Oracle to fetch data. I have an issue with data types of column used in where clause. Here is example .

select * from tbl_menu where menu_id not in (select get_hidden_menu(23) from dual) ;

Here my menu_id is Integer and function get_hidden_menu will return comma separated number like 1,2 as character. Wheneve i try to execute this query I am getting "ora 01722 invalid number". It works fine if the function returns single element.

Thanks

aatif
  • 147
  • 1
  • 1
  • 8
  • 1
    You can't dynamically create a list of values like that - you'll need to convert the comma separated value into separate values. See [this answer](https://stackoverflow.com/a/10354113/3061852) to a similar question. – kfinity Dec 13 '21 at 16:17
  • @kfinity Ok so I can't use dynamically created comma separated character in where clause!! I will check it by converting into rows. Thanks – aatif Dec 13 '21 at 18:22

0 Answers0