I have a text e.g AOCup and i need it to match AO Cup

Where currentsite variable below is = AOCup but what im querying is AO Cup

Thanks in Advance

** I also used Contain with no luck

 <Query><Where><BeginsWith><FieldRef Name='Title'/><Value Type='Text'>" + currentSite + "</Value></BeginsWith></Where></Query>

2 Answers 2


you can try using below query:

     <FieldRef Name='Title' />
     <Value Type='Text'>AO</Value>
  • Thanks Hardik but i tried using just contain and had no luck
    – naijacoder
    Sep 17, 2014 at 12:44

there is no such thing as like in caml queries but you could try it with an AND connection and a condition, something like this:

<Query><Where><And><Contains><FieldRef Name='Title'/><Value Type='Text'>" + AO + "</Value></Contains>
<Contains><FieldRef Name='Title'/><Value Type='Text'>" + Cup + "</Value></Contains>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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