I've got a select query in a Google Sheet, for the most part it works. It's selecting a bunch of rows where a column equals a value in another cell. For example:
WHERE G='" & K7 & "' AND Q is not Null order by Q Asc limit 3
I've just encountered a problem where if K7 which is a text value contains a ' in the cell the query doesn't work. What do I need to include to ensure the query still works if it contains these values?