Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> how to put quotes in dynamic sql?
I have a pl/sql block that pass a DDL as a string into an other procedure to
execute the DDL statements using dynamic sql. The dynamic sql procedure is
called 'exec':
exec('DROP TABLE table_name');
I got a problem when I come across a DDL which has a string in the where clause. The multiple quotes generate an error: exec('CREATE TABLE table_name as SELECT * from other_table where field_name 'hello''); ^^
Any ideas?
Thanx in advance!
Ed
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Feb 23 1999 - 00:27:22 CST