1

YQL Apostrophe/Single Quote Syntax Issue

We recently came across this issue: when trying to query for a string value containing an apostrophe (single quote) - YQL did not return the expected results. E.g. when searching for the query term "BJ's", YQL did not return any results.

The YQL query builder suggested to encode the apostrophe as: ' however this did not return any results. (screenshot: http://screencast.com/t/WqBGBaik). We also tried %27 and BJ\'s (which would work on mysql) but nothing worked.

We were, however able to get results for query="BJ s" (replaced apostrophe with a space).

Does anyone know what is the correct syntax to encode/escape an apostrophe/single quote inside a string?

by
2 Replies
  • Hi Ben,

    try double escaping.

    eg: select * from local.search where zip="07302" and query="BJ\'s Wholesale"

    Thanks -Paul

    0
  • let me try that again..

    select * from local.search where zip="07302" and query="BJ\\'s Wholesale"
    
    0

Recent Posts

in YQL