Re: PL/SQL - help

From: Narayanan Olagappan <narayan_at_sprynet.com>
Date: 1997/08/02
Message-ID: <33E3C7DD.3B5_at_sprynet.com>#1/1


Manjula Krishnan wrote:
>
> Can someone tell me what is wrong with my procedure :
>
> create or replace procedure test
> (keywd1 varchar2 , join1 varchar2 , keywd2 varchar2) as
> kcursor integer;
>
> begin
> kcursor := dbms_sql.open_cursor;
> dbms_sql.parse(kcursor, 'SELECT PATHNAME, DESCR, ASC_NUM FROM
> POMPEII, KEYWORD WHERE KEYWORD.PICTURE = POMPEII.ASC_NUM AND
> LOWER(KEYWORDS.KEYWRDS) = LOWER(' || keywd1 ||' )' ||
> join1 || 'LOWER(KEYWORDS.KEYWRDS) = LOWER(' || keywd2 || ' )',
> dbms_sql.v7);
> dbms_sql.close_cursor(kcursor);
> end;
>
> --- It compiles successfully. But, gives me the following errors at
> runtime.
>
> SQL> execute test('black', 'and' , 'figure');
> begin test('black', 'and' , 'figure'); end;
>
> *
> ERROR at line 1:
> ORA-00904: invalid column name
> ORA-06512: at "SYS.DBMS_SYS_SQL", line 239
> ORA-06512: at "SYS.DBMS_SQL", line 25
> ORA-06512: at "CLSWORKER.TEST", line 8
> ORA-06512: at line 1
>
> Thanks,
>
> Manjula

Table keyword is refered as keywords in keywords.keywrds. Plus single quote needs to be included before and after the content of keywrd1 and keywrd2. Received on Sat Aug 02 1997 - 00:00:00 CEST

Original text of this message