When I execute SOQL in Developer Console:

Select Id, Amount From Opportunity Where Amount > 10000000000

An parsing error occurs:

Unknown error parsing query

Is there length limit of number on SOQL Where condition?

  • 1
    Funny enough the query will work if you added ".0" at the end to be 10000000000.0 – Amr Ibrahim Jan 19 '16 at 5:53

According to your query you are passing 10000000000 which is a 11 digit Integer value.

In Salesforce or Java Integer can not be bigger than 2,147,483,647. Current value you are passing is considered as Integer and exceeds the given number so error is given.

Try adding decimal. Decimal can be bigger upto 2 raise to power 63 - 1. So this will work:

Select Id, Amount From Opportunity Where Amount > 10000000000.0

Compiler will understand that it is a decimal.


As per document ..

Maximum number we can use is 2,147,483,647.


A 32-bit number that does not include a decimal point. Integers have a minimum value of -2,147,483,648 and a maximum value of 2,147,483,647. For example:


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.