PL/SQL (MOSC)

MOSC Banner

string with single quotes in query and query fails with ORA-00923: FROM keyword not found where expe

edited May 26, 2013 6:10AM in PL/SQL (MOSC) 6 commentsAnswered
Hi gurus,

I have a query


select &name ,& desig from dual;
ORA-00923: FROM keyword not found where expected


and &name and &desig comes from a package in global variables

and valiables  &name  and &desig values are 'Test'ing'  and  'Querys'  respectively
 with the values query is formed/looks like

select 'Test'ing' , 'Querys' from dual;

this query fails with ORA-00923: FROM keyword not found where expected .

Please provide your inputs how to handle strings which has single quotes in sting while running a sql statement where the values are dynamicaaly passed to variables and variables are substituted in sql query.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center