how to build caml query for following condition. All the fields all from single list.

select empid, ename, salary from emp where empid=(100 or 107 or 99 or 103 or 105) and deptno=10 and mgrId=23

1 Answer 1


Try below:

        <FieldRef Name='empid'/>
        <FieldRef Name='ename'/>
        <FieldRef Name='salary'/>
                    <FieldRef Name='empid' />
                        <Value Type='Integer'>100</Value>
                        <Value Type='Integer'>107</Value>
                        <Value Type='Integer'>99</Value>
                        <Value Type='Integer'>103</Value>
                        <Value Type='Integer'>105</Value>
                    <Eq><FieldRef Name='deptno'/><Value Type='Integer'>10</Value></Eq>
                    <Eq><FieldRef Name='mgrId'/><Value Type='Integer'>23</Value></Eq>

Also you can see list of caml query builder tools . You can use any of these tools to further build more queries and test it.

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.