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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.