Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL Pb
Laurent PISSARD wrote:
>
> I am doing a "SELECT" on five columns and only 2 columns are accept
> by the compler :
> If someone have an idea of my Pb, Thanks a lot.
>
> My Procedure Body :
> ------------------------
> curseur := DBMS_SQL.OPEN_CURSOR;
>
> DBMS_SQL.PARSE (curseur,
> 'SELECT gd_nid, gd_nidpath, gd_name, gd_itemtype,
> gd_encode
> FROM cognaq_gd_items
> WHERE ' || p_requete,
> DBMS_SQL.V7 );
>
> DBMS_SQL.DEFINE_COLUMN (curseur, 1, nid);
> DBMS_SQL.DEFINE_COLUMN (curseur, 2, nidpath);
> DBMS_SQL.DEFINE_COLUMN (curseur, 3, name);
> DBMS_SQL.DEFINE_COLUMN (curseur, 4, itemtype);
> DBMS_SQL.DEFINE_COLUMN (curseur, 5, encode);
> ...
> 191/7 PLS-00307: trop de déclarations de 'DEFINE_COLUMN'
> correspondent
> à cet appel
>
> 191/7 PL/SQL: Statement ignored
> 192/7 PLS-00307: trop de déclarations de 'DEFINE_COLUMN'
> correspondent
> à cet appel
>
> 192/7 PL/SQL: Statement ignored
> 194/7 PLS-00307: trop de déclarations de 'DEFINE_COLUMN'
> correspondent
> à cet appel
>
Gee. Even error messages look romantic in French!
PLS-307 means that the compiler could not decide which overloaded copy of the procedure you meant to call. DEFINE_COLUMN is everloaded with the third argument as type varchar2, number, date, and mlslabel. You do not show the declaration of name, itemtype and encode, but apparently there is enough ambiquity that the compiler cannot decide if they are, for instance, a number or a date.
-- Tomm Carr tommcatt@computer.org -- http://www.geocities.com/athens/delphi/6769 -- The Macintosh computer is like the open range; -- In a world without fences, there are no Gates.Received on Wed Sep 03 1997 - 00:00:00 CDT