Re: Help dynamic query with DBMS_SQL package

From: DanHW <danhw_at_aol.com>
Date: 17 Aug 1999 02:59:07 GMT
Message-ID: <19990816225907.20167.00000758_at_ng-fc1.aol.com>


>Help Please!
>
>I get an ORA-00911: invalid character from Oracle 7.3 with this statement:
>dbms_sql.parse(cursor_handle, 'select client_name from clients where
>client_name LIKE JON%', DBMS_SQL.V7);
>
>but this one works just fine:
>dbms_sql.parse(cursor_handle, 'select client_name from clients where
>client_name = JONES', DBMS_SQL.V7);
>
>Thanks,
> -Greg-

You need quotes around JON% and JONES...

dbms_sql.parse(cursor_handle, 'select client_name from clients where client_name LIKE ''JON%''', DBMS_SQL.V7);

(Each of the quotes is a single quote mark)

Dan Hekimian-Williams Received on Tue Aug 17 1999 - 04:59:07 CEST

Original text of this message