How can I escape an apostrophe inside a SQL query in Google Sheets?
Here's my function:
=QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman's blabla: blablabla'"),"SELECT Col1, Col2")
I've tried adding another apostrophe:
=QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman''s blabla: blablabla'"),"SELECT Col1, Col2")
No luck.. and I've tried putting a backslash, no luck as well:
=QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman/'s blabla: blablabla'"),"SELECT Col1, Col2")
EDIT: The locale of the document is UK.
Try using double quotes around the word with the apostrophe
"SELECT * WHERE Col2 = ""Woman's blabla: blablabla"""