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?

1 Answer 1

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.

1
  • I thought so too, but was not quite sure. Thanks! Commented Feb 3, 2015 at 3:48

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.