Hi Tom,
In the Documentation is written that:
"You cannot use EXISTS if collection is an associative array"
But I have tried this and it works very fine. Please check this Siite which uses an associative array indexed by varchar2:
http://www.oracle-developer.net/display.php?id=428 I would be very garateful for your answer as I want to be sure that my procedure from six months ago was written correctly.
Thanks
When you find a discrepancy like that, it would be best to boil the sample down to the very essence of the issue AND link to the doc.. something like:
doc
https://docs.oracle.com/database/121/LNPLS/collection_method.htm#LNPLS01306 says "You cannot use EXISTS if collection is an associative array", but that is not true as evidenced by:
ops$tkyte%ORA11GR2> declare
2 type aarray is table of varchar2(20) index by varchar2(1);
3 l_data aarray;
4 begin
5 l_data('A') := 'hello world';
6
7 if ( l_data.exists('A') )
8 then
9 dbms_output.put_line( 'it exists' );
10 end if;
11 end;
12 /
it exists
PL/SQL procedure successfully completed.
I've notified the doc writers about this - looks like a doc bug, it was probably an unimplemented feature back in the past that got implemented but the doc was never updated.