Re: dbms_utility.comma_to_table problem

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/10/28
Message-ID: <34581064.8500152_at_newshost>#1/1


Its because comma_to_table doesn't do what you think it does.... If you take your example change '1,2,3,4,5' to 'all_users,all_objects,all_indexes' for example, it would work (since all_users, all_objects, all_indexes are real object names). The definition of comma_to_table:

  PROCEDURE comma_to_table( list IN VARCHAR2,

                            tablen OUT BINARY_INTEGER,
                            tab    OUT uncl_array);
  • Convert a comma-separated list of names into a PL/SQL table of names
  • This uses name_tokenize to figure out what are names and what are commas

is not very clear. It can be used to generate a table of object NAMES (real database objects) but not a generic list of items.

the missing identified stems from the fact you probably don't have a database object named "1"

On Fri, 24 Oct 1997 16:54:47 +0100, Andy Hardy <Andy_Hardy_at_camk.demon.co.uk> wrote:

>Hi,
>
>I have the following procedure:
>
>procedure test
>is
> my_string varchar2(80) := '1,2,3,4,5';
>
> my_table dbms_utility.uncl_array;
> my_len BINARY_INTEGER;
> begin
> dbms_utility.comma_to_table(my_string, my_len, my_table);
>
> FOR v_index IN 1..my_len LOOP
> dbms_output.put_line(my_table(v_index));
> END LOOP;
>end;
>
>When I run it I get:
>
>ERROR at line 1:
>ORA-00931: missing identifier
>ORA-06512: at "SYS.DBMS_UTILITY", line 54
>ORA-06512: at "SYS.DBMS_UTILITY", line 83
>ORA-06512: at "ORCLOWNER.TEST", line 8
>ORA-06512: at line 1
>
>Any ideas?
>
>Andy
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

NOTICE: In order to cut down on the amount of time I spend applying silly logic to email addresses like "In order to cut down on spam, remove THIS from my email" or "In order to cut down on spam, reverse my email address", etc, I will simply hit delete when that mail bounces back to me, which is what I do with spam myself.  

I haven't figured out whats more time consuming for me, deleting spam or resending emails after re-reading the whole thing to figure out the algorithm to apply. Received on Tue Oct 28 1997 - 00:00:00 CET

Original text of this message