Hi all,

I encountered another problem with the following statement in a procedure:

execute immediate 'create table ABC.XXX as SELECT * FROM XYZ WHERE Name ='||v_Name||' or vName is null';

when I call this procedure by passing v_Name='US', I received an error message on this line :

ORA-00904: invalid column name

vName is a varchar2 data type. I have other statements as:

execute immediate 'create table ABC.XXX as SELECT * FROM XYZ WHERE id ='||v_id||' or vName is null';

v_id is an integer, and it worked fine.

So I guess it's the syntax that mess things up, can someone suggest please, thanx.