don't convert the varchar, as you'll get truncation issues if you don't say how large to convert to;
the rest is just syntax; you need to escape the single quote to make the variable have the value.
this returns 3 for the charindex:
Declare @strTest as VARCHAR(100)
set @strTest = 'ab''c'
select charindex(CHAR(39),@strTest)
Lowell
--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!