Monday, July 25, 2011

FullTextSqlQuery Search Queries with URL

Recently I was working with Full Text SQL Search Queries and found a strange issue while filtering with the URL in the query. If the URL contains special characters its giving me the exception improper query.

My Old Query was
SELECT ArticleDate, URL FROM SCOPE()
WHERE CONTAINS(URL, 'http://mritunjay.com/sites/the site/docs/URLTest @/')

after few encoding I tried to embed the URL in the " I was able to get the correct output

SELECT ArticleDate, URLFROM SCOPE()
WHERE CONTAINS(URL, '"http://mritunjay.com/sites/the site/docs/URLTest !@$/"')

No comments:

Post a Comment