Skip to Main Content

Oracle Database Discussions

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!

ORA-00932: inconsistent datatypes: expected number got binary

erics44Dec 9 2011 — edited Dec 9 2011
Hi
I am getting the above error on the following function, does anyone know what it could mean?

its on the line in bold

thanks in advance

(s_entry IN varchar2)
return ind_field_value_table
IS
found_count integer;
t_return ind_field_value_table := ind_field_value_table();
begin

for cur in (select owner, table_name, column_name
from all_tab_columns
where owner <> 'SYS' and owner <> 'SYSTEM' Order by owner, table_name, column_name)


loop

execute immediate
*'select count(' || cur.column_name || ') from ' || cur.owner || '.' || cur.table_name || ' where NVL(TO_CHAR(' || cur.column_name || '), ''None'') = ' || '''' || s_entry || ''''*
into found_count;

found_count := nvl(found_count, 0);

if found_count <> 0 then
t_return.extend;
t_return(t_return.count) := ind_field_value(cur.owner, cur.table_name, cur.column_name);
end if;

end loop;

return t_return;
end;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2012
Added on Dec 9 2011
3 comments
3,153 views