8

I have search and see the way how to write CAML Query with 3 AND conditions. However, I am not sure how to write CAML Query with more than 3 AND conditions may be with 4 or 5 AND conditions.

Can any body write for me the CAML Query with 4 or 5 AND conditions. Or any link showing that Query ?

17

Just continue to nest the queries...

<And>
    <Eq>... condition...</Eq>
    <And>
        <Eq>... condition...</Eq>
        <And>
            <Eq>... condition...</Eq>
            <And>
                <Eq>... condition...</Eq>
                <Eq>... condition...</Eq>
            </And>
        </And>
    </And>
</And>
  • 1
    Check the Query below, is that is correst ? – SPBeginer Jan 11 '13 at 16:29
2

just use CAML Query builder. This is free tool, just use it's visual interface to create queries of different complexity.

Update: The link to u2u builder above is broken now. Currently I use SPCAMLQueryHelper from codeplex instead.

  • link is broken. Is this still available? – Michael Colbs Jun 10 '14 at 16:38
  • Currently I use another builder, possibly u2u doesn't support old builder anymore. See my update above. – Anton Khritonenkov Jun 10 '14 at 20:58

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.