Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why automatic conversion is not taking place?

JackKJan 21 2023 — edited Jan 22 2023

Hi All.
I have a type:

create or replace type t_varchar2s is table of varchar2(255);

When I'd like to read data like this:

select * from ALL_OBJECTS o
 where o.namespace member of t_varchar2s('1');

there is no rows returned.
But when I am reading like this:

select * from ALL_OBJECTS o
 where to_char(o.namespace) member of t_varchar2s('1');

rows are returned.
Why Oracle is not doing automatic conversion? Is there any option to make Oracle do it anyway?
I am using Oracle 19c

Thanks in advance for help,
Jacek

Comments
Post Details
Added on Jan 21 2023
3 comments
221 views