Looking at the following query, you'd expect it to return rows that had 'pdf' in either of the two columns.

However, if 'pdf' exists in 'FileSiteTitle' and 'FileSiteComments' is null, the row is not returned.

SELECT FileSiteTitle, FileSiteComments, Path 
FROM portal..scope() 
WHERE "SCOPE" = 'All Sites' 
AND SiteTitle = '45611' 
AND ListContentType = 'FileSiteFields' 
AND ( FileSiteTitle LIKE '%pdf%' OR FileSiteComments LIKE '%pdf%' ) 

I know this is only mimicing SQL query, but it should try better no?

I tried FileSiteComments IS NULL OR FileSiteComments LIKE '%pdf%' but that just throws a COM Exception, even though the is null predicate is documented here

'FileSiteComments' is a "Multiple lines of text" field if that helps.

Any workaround?


1 Answer 1


A tool you can use to easy build and resolve issues with Search Queries is the SharePoint Search Service Tool (http://sharepointsearchserv.codeplex.com/). Hope it helps!

  • already using it
    – BobTodd
    May 26, 2011 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.