Re: CAML query: Can an <OR> contain more than 2 elements

From: Mike Walsh (englantilainen_at_hotmail.com)
Date: 01/27/05


Date: Thu, 27 Jan 2005 20:39:35 +0200

To the question - can only contain.

Sorry it was unclear.

Mike Walsh, Helsinki, Finland

"gwailoh" <mynick@gmail.com> wrote in message
news:OQcXakJBFHA.4008@TK2MSFTNGP09.phx.gbl...
> Mike,
>
> is that 'I doubt it' to the subject
> CAML query: Can an <OR> contain more than 2 elements
>
> or the body
> Must a CAML OR only contain 2 values?
>
> "Mike Walsh" <englantilainen@hotmail.com> wrote in message
> news:eqytFKJBFHA.1404@TK2MSFTNGP11.phx.gbl...
>> > Must a CAML OR only contain 2 values?
>>
>> I doubt it. Look in the SharePoint Team Services SDK.
>>
>> You'll probably find some examples and/or the reason there.
>>
>> (Hopefully as this is the newsgroup for STS 1.0 you *are* using STS 1.0)
>>
>> Mike Walsh, Helsinki, Finland
>> STS FAQ at http://www.collutions.com/Lists/FAQ
>> Please reply to the newsgroup
>>
>> "Jim O'Neill" <gwailoh@gmail.com> wrote in message
>> news:2aae28de.0501270501.7b1620ff@posting.google.com...
>> > Hi,
>> >
>> > I am attepting to get upto speed with CAML, but I am having issues
>> > when I attempt to have an OR with more than 2 criteria,
>> >
>> > i.e. in TSQL a OR b OR c,
>> >
>> > using
>> > <Or>
>> > <Contains><FieldRef Name='Keywords'/><Value
>> > Type='Text'>c#</Value></Contains>
>> > <Contains><FieldRef Name='Keywords'/><Value
>> > Type='Text'>c++</Value></Contains>
>> > <Contains><FieldRef Name='Keywords'/><Value
>> > Type='Text'>foxpro</Value></Contains>
>> > </Or>
>> >
>> > I get thrown an error, while below works
>> >
>> > <Or>
>> > <Contains><FieldRef Name='Keywords'/><Value
>> > Type='Text'>c#</Value></Contains>
>> > <Contains><FieldRef Name='Keywords'/><Value
>> > Type='Text'>c++</Value></Contains>
>> > </Or>
>> >
>> > Must a CAML OR only contain 2 values?
>>
>>
>
>



Relevant Pages