none
WebDAV wildcard(%) serach fails. RRS feed

  • Question

  • Hi All,

    I am trying to execute following WebDAV query in order to retreive count of records whose emails are on a particular domain like ddd.com

    <?xml version="1.0" encoding="utf-8" ?>
    <a:searchrequest xmlns:a="DAV:" >
    <a:sql>
    SELECT "DAV:visiblecount"  FROM SCOPE('DEEP TRAVERSAL OF "http://myserver/exchange/myemail@mydomain.com/Contacts"')  WHERE "DAV:ishidden" = false AND "DAV:isfolder" = false AND "urn:schemas:contacts:email1" LIKE '%@ddd.com' GROUP BY "D:contentclass" 
    </a:sql>
    </a:searchrequest>

    The query fails with 'Bad Request'

    If I add % at the end of LIKE criteria it works fine but that will not give me correct results.

    <?xml version="1.0" encoding="utf-8" ?>
    <a:searchrequest xmlns:a="DAV:" >
    <a:sql>
    SELECT "DAV:visiblecount"  FROM SCOPE('DEEP TRAVERSAL OF "http://myserver/exchange/myemail@mydomain.com/Contacts"')  WHERE "DAV:ishidden" = false AND "DAV:isfolder" = false AND "urn:schemas:contacts:email1" LIKE '%@ddd.com%' GROUP BY "D:contentclass" 
    </a:sql>
    </a:searchrequest>

    Please help.

    Thanks,

    Rafeeq


    12345
    Tuesday, November 23, 2010 6:02 PM

Answers

All replies

  • Hi Rafeeq:

    I have alerted protocol documentation team about your inquiry. A member of the team will be in touch soon.


    Regards, Obaid Farooqi
    Tuesday, November 23, 2010 7:45 PM
    Owner
  • Rafeeq, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.
    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Tuesday, November 30, 2010 4:30 PM
    Moderator
  • Rafeeq, per MS-XWDSEARCH section 2.2.4.3.4.1.2, the wildcard-value MUST end with a '%'. That would explain why your query without it fails. You might try adding an additional NOT LIKE clause to filter out the extra results that should not be included.
    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Tuesday, November 30, 2010 6:41 PM
    Moderator