0

I have the following table:

DoubleNumber
-------------
10.50
44.77
88.90

I am using the following CAML Query:

query.Query = "<Where><Contains><FieldRef Name=\"DoubleNumber\"/><Value Type=\"Decimal\">44</Value></Contains></Where>";

Logically speaking, it should return no records. But, I dont understand why it keeps returning the second record.

Any idea?

0

Instead of Contains you should use <Gt> (Greater than) or Lt (Less than).

Contains operator works with String type. Since you are using decimal you should always use arithmetic logic operators.

  • I thought so too, but was not quite sure. Thanks! – user1109363 Feb 3 '15 at 3:48

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.