Saturday, August 23, 2008

PLS-00371

157/6 PL/SQL: SQL Statement ignored
157/93 PLS-00371: at most one declaration for 'RP_CMS_OFFER_RETRIEVAL.LCAMPAIGNCODE' is permitted


[ROOT CAUSE]
lcampaigncode VARCHAR2(10) := '';
lsegtable VARCHAR2(30) := '';
lidentification_no VARCHAR2(30) := '';
idnocounter INTEGER := 1;
idnostart INTEGER := 0;
idnoend INTEGER := -1;
lcampaigncode VARCHAR2(10) := '';
...


As you can see above, there are two lines to declare lcampaigncode.

After I removed one, re-compile the procedure successfully.


This problem occurred when I import objects from 9i database to 10g. The object was valid in 9i , however invalid in 10g. Think 10g has stricter checking.