TehOne
TehOne

Reputation: 2659

Is there a way to use something like IN for a CAML query?

I'd like to query a list using multiple ids at the same time. In straight SQL, I could just use IN(ID1, ID2, ID3). Is there any way to do this within a CAML query?

Upvotes: 1

Views: 112

Answers (1)

xdazz
xdazz

Reputation: 160953

Yes, there is In Element (Query).

<In>
  <FieldRef Name = "Field_Name"/>
  <Values>    <Value Type = "Field_Type"/>
  </Values>  <XML />
</In>

Upvotes: 1

Related Questions