ewang1205
asked on
single quote problem
The following code doesn't work. I have to use a defined varible my_long_string and the value could be anything like TE'ST, TES'T .... Is there a simple way to make this work in the select statement and find my_desc ='TE'ST';? Thanks.
define my_long_string='TE'ST';
select * from emp where emp_desc = '&my_long_string';
define my_long_string='TE'ST';
select * from emp where emp_desc = '&my_long_string';
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I also tried the following and not working.
define my_long_string='TE'''ST';
define my_long_string='TE''''ST';
define my_long_string='TE'''ST';
define my_long_string='TE''''ST';
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER