title: CAML IN operator and AND operator with multiple condition
body: <p>The Following CAML Query Not Working for me.. I am not aware much about sharepoint platform. i am using SP 2007 and trying to use IN operator for a lookup field.</p>
  
  <pre><code>"&lt;Where&gt;"
                                  + "&lt;And&gt;"
                                  + "&lt;And&gt;"
                                  + "&lt;In&gt;"
                                  + "&lt;FieldRef Name='Role'/&gt;"
                                  + "&lt;Values&gt;"
                                  + "&lt;Value Type = 'Text'&gt;A&lt;/Value&gt;"
                                  + "&lt;Value Type = 'Text'&gt;B&lt;/Value&gt;"
                                  + "&lt;/Values&gt;"
                                  + "&lt;/In&gt;"
                                  + "&lt;Leq&gt;"
                                  + "&lt;FieldRef Name='Enddate'/&gt;&lt;Value Type = 'DateTime'&gt;" + SPUtility.CreateISO8601DateTimeFromSystemDateTime(Dt) + " &lt;/Value&gt;"
                                  + "&lt;/Leq&gt;"
                                  + "&lt;/And&gt;"
                                  + "&lt;Includes&gt;"
                                  + "&lt;FieldRef Name='Menu'/&gt;&lt;Value Type='Text'&gt;Benefits&lt;/Value&gt;"
                                  + "&lt;/Includes&gt;"
                                  + "&lt;/And&gt;"
                                  + "&lt;/Where&gt;";
  </code></pre>
  
  <p>The above query not return anything but i have values in my list for the above combination.</p>
  
  <p>If I slightly modify the query like following w/o using IN then it is working fine.</p>
  
  <pre><code>"&lt;Where&gt;"
                                  + "&lt;And&gt;"
                                  + "&lt;And&gt;"
                                  + "&lt;Eq&gt;"
                                  + "&lt;FieldRef Name='Role'/&gt;"
                                  //+ "&lt;Values&gt;"
                                  + "&lt;Value Type = 'Text'&gt;A&lt;/Value&gt;"
                                  //+ "&lt;Value Type = 'Text'&gt;B&lt;/Value&gt;"
                                  //+ "&lt;/Values&gt;"
                                  + "&lt;/Eq&gt;"
                                  + "&lt;Leq&gt;"
                                  + "&lt;FieldRef Name='Enddate'/&gt;&lt;Value Type = 'DateTime'&gt;" + SPUtility.CreateISO8601DateTimeFromSystemDateTime(Dt) + " &lt;/Value&gt;"
                                  + "&lt;/Leq&gt;"
                                  + "&lt;/And&gt;"
                                  + "&lt;Includes&gt;"
                                  + "&lt;FieldRef Name='Menu'/&gt;&lt;Value Type='Text'&gt;Benefits&lt;/Value&gt;"
                                  + "&lt;/Includes&gt;"
                                  + "&lt;/And&gt;"
                                  + "&lt;/Where&gt;";
  </code></pre>
  
  <p>(Please Don't Suggest me to use CAML Query builder cuz I cannot install anything on my DEV box. And Moreover I haven't install SP WSS in my local :) )</p>