Sql code with single quote issue

LilSisKin

New Member
I am running into an issue where I have some sql code in my process and I am trying to use a where clause to limit the data however one of my data items to pull in is last name. Some last names have a single quote so when it's pulling those in it looks at the name as 'O' instead of O'Connor. Below is that part of the code. How can I get it to look for O'Connor instead of just O?


SQL:
Where l.ResidentLastName = '"&[Resident Info Collection.Resident Last Name]&"'
    and Convert(Varchar,ta.EndDate, 101) = '12/31/2099'"
 
Top