Link to home
Start Free TrialLog in
Avatar of ewang1205
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';
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ewang1205
ewang1205

ASKER

Doesn't work.  Have you tried?  
I also tried the following and not working.
define my_long_string='TE'''ST';
define my_long_string='TE''''ST';
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial