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!

PL/SQL: ORA-02000: missing COLUMNS keyword

OrcL-FaNAug 27 2015 — edited Sep 2 2015

Hello All,

while running the below query i am getting an error, though the same code is working fine in other place like www.apex.oracle.com i.e online practice URL for apex. Please suggest me the possible ways to solve it.

Code-

declare

j number:=1;

cursor cur_names is select str from (with t as

(

  select 'a,b,c' str from dual

)

select TRIM(column_value) STR

  from t, xmltable(('"' || replace(str, ',', '","') || '"')) );

begin

APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(

        p_collection_name => 'GOOGLEMAP');

for i in cur_names loop

dbms_output.put_line(i.str);

APEX_COLLECTION.ADD_MEMBER(

        p_collection_name => 'GOOGLEMAP',

       -- SEQ_ID         => j,

        p_c001            => i.str );

end LOOP;

end;

Error:

Error report:

ORA-06550: line 9, column 25:

PL/SQL: ORA-02000: missing COLUMNS keyword

ORA-06550: line 3, column 21:

PL/SQL: SQL Statement ignored

06550. 00000 -  "line %s, column %s:\n%s"

*Cause:    Usually a PL/SQL compilation error.

*Action:

Thanks & Regards,

Pinto Das

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2015
Added on Aug 27 2015
2 comments
1,676 views