Debugging "ORA-06550 Duplicate column name" error

Just trying to modify our blog user table, to fit the requirements for guest users, who could just publish articles on apexninjas.com and don't have access to all the tabs… So, added a new column and suddenly the "Create user" page gives me a "ORA-06550 Duplicate column name" error on submit (ORA-06550: line 1, column 139: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored).

How to debug this error. Execute the following query:

SELECT   db_column_name,
         count(*) as occurences
FROM     apex_application_page_db_items
WHERE    page_id = 321
AND      application_id = 200
GROUP BY db_column_name
HAVING count(*) > 1;

You will get the duplicate columns referred in your page. To exactly see where the column is referenced execute:

SELECT   *
FROM     apex_application_page_db_items
WHERE    db_column_name = :duplicate_column_name.

The only thing to do is check out why you are referencing a column twice in Automatic Row Processing (DML)…

Leave a Reply