Have a SQL table that PAD is querying. Column A contains string values, in some of the rows apostrophes are used.
I am then using those data values to perform an additional query in a completely separate flow.
However I then get an error that indicates it has not been escaped properly:

I have tried running the query with the variable in double quotes "%example%" and with the variable in single quotes '%example%'. I have also tried replacing the apostrophe with two, as has been suggested on PA (but not PAD) pages but to no avail.
Any suggestions?