| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Has any one used dbms_utility.comma_to_table?
You might have picked the wrong tool to solve your problem. The items
in the list must conform to the ORACLE identifier standard - first
character must be letter, 32 chars max, and you can not have '.' in
them. For example:
SQL> declare
2 l_list varchar2(1000) := 'x9.0.2,x9.0.1';
3 l_tablen binary_integer;
4 l_tab dbms_utility.uncl_array;
5 begin
6 dbms_utility.comma_to_table(l_list, l_tablen, l_tab);
7
8 for i in 1 .. l_tablen
9 loop
10 dbms_output.put_line('rdbms_ver_supported=' || l_tab(i));
11 end loop;
ORA-20001: comma-separated list invalid near x9.0.
ORA-06512: at "SYS.DBMS_UTILITY", line 174
ORA-06512: at "SYS.DBMS_UTILITY", line 202
ORA-06512: at line 6
SQL> declare
2 l_list varchar2(1000) := 'x902,x901';
3 l_tablen binary_integer;
4 l_tab dbms_utility.uncl_array;
5 begin
6 dbms_utility.comma_to_table(l_list, l_tablen, l_tab);
7
8 for i in 1 .. l_tablen
9 loop
10 dbms_output.put_line('rdbms_ver_supported=' || l_tab(i));
11 end loop;
PL/SQL procedure successfully completed.
SQL> set serveroutput on
SQL> /
rdbms_ver_supported=x902
rdbms_ver_supported=x901
PL/SQL procedure successfully completed.
SQL> declare
2 l_list varchar2(1000) :=
'x1234567891234567891234567891234567';
l_tablen binary_integer;
3 l_tab dbms_utility.uncl_array;
4 begin
5 dbms_utility.comma_to_table(l_list, l_tablen, l_tab);
6
7 for i in 1 .. l_tablen
8 loop
9 dbms_output.put_line('rdbms_ver_supported=' || l_tab(i));
10 end loop;
ORA-00972: identifier is too long ORA-06512: at "SYS.DBMS_UTILITY", line 125 ORA-06512: at "SYS.DBMS_UTILITY", line 160 ORA-06512: at "SYS.DBMS_UTILITY", line 202 ORA-06512: at line 5
SQL>
"Sunil" <sunil_franklin_at_hotmail.com> wrote in message news:<iHy%8.14$V%4.33_at_news.oracle.com>...
> I have the following code
>
> create or replace procedure test789 is
> l_list varchar2(1000) := '9.0.2,9.0.1';
> l_tablen binary_integer;
> l_tab dbms_utility.uncl_array;
> begin
> dbms_utility.comma_to_table(l_list, l_tablen, l_tab);
>
> for i in 1 .. l_tablen
> loop
> dbms_output.put_line('rdbms_ver_supported=' || l_tab(i));
> end loop;
> end test789;
>
> which throwing the error shown below
>
> ORA-00931: missing identifier
> ORA-06512: at "SYS.DBMS_UTILITY", line 105
> ORA-06512: at "SYS.DBMS_UTILITY", line 140
> ORA-06512: at "SYS.DBMS_UTILITY", line 182
> ORA-06512: at "SFRANKLI14.TEST789", line 8
> ORA-06512: at line 1
>
>
> Any suggestions?
>
>
> Thanks,
> Sunil.
Received on Wed Jul 24 2002 - 16:53:53 CDT
![]() |
![]() |