SharePoint Products TechCenter > SharePoint Products and Technologies Forums > SharePoint - Search > Enterprise search SQL using Contains on the PreferredName field with wildcard
Ask a questionAsk a question
 

AnswerEnterprise search SQL using Contains on the PreferredName field with wildcard

  • Friday, October 30, 2009 2:07 PMPremjitM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I try to search the field using this: "Select PreferredName FROM portal..scope() WHERE \"scope\"='people' AND InternationalGroup <> '' AND ( CONTAINS(PreferredName,'\"da*\"')) ORDER BY PreferredName ASC"

    and 0 results are retrieved; even though I know there are peoples names present in the PrefferedName field whose surname or lastnames begin with "da"

    If I use this termI get all the retrievals back
    "Select PreferredName FROM portal..scope() WHERE \"scope\"='people' AND InternationalGroup <> '' AND ( CONTAINS(PreferredName,'\"*\"')) ORDER BY PreferredName ASC"

    Any advice please

Answers

All Replies