function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Venk_ModelMetriVenk_ModelMetri 

Problem with Double data type in a query

I'm trying to retrieve all records who's custom field value is > 0

My Code

final Double ZERO = new Double(0.0);

 String sqlquery =
          "select Id, description, contactId, origin from Case where Cumulative_Support_Time__c > "+ZERO;
          try {
            qr = binding.query(sqlquery);
          }

I get a INVALID_NUMBER Exceptions.

Any help in this would be appreciated. (Note: The program terminates at binding.query() statement. The value of Cumulative_Support_Time_C could potentially be NULL. Is that a prob?)

 

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.sql.SQLException: ORA-01722: invalid number

 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.sql.SQLException: ORA-01722: invalid number

 faultActor:
 faultNode:
 faultDetail:

java.sql.SQLException: ORA-01722: invalid number

        at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
.java:260)
        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:169)
        at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri
alizationContextImpl.java:1015)
        at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
        at org.apache.crimson.parser.Parser2.content(Unknown Source)
        at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
        at org.apache.crimson.parser.Parser2.content(Unknown Source)
        at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
        at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
        at org.apache.crimson.parser.Parser2.parse(Unknown Source)
        at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java1442)
        at com.salesforce.quickstart.task.resetCase(task.java:354)
        at com.salesforce.quickstart.task.<init>(task.java:72)
        at com.salesforce.quickstart.task.main(task.java:47)


java.sql.SQLException: ORA-01722: invalid number

        at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
.java:260)
        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:169)
        at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri
alizationContextImpl.java:1015)
        at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
        at org.apache.crimson.parser.Parser2.content(Unknown Source)
        at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
        at org.apache.crimson.parser.Parser2.content(Unknown Source)
        at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
        at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
        at org.apache.crimson.parser.Parser2.parse(Unknown Source)
        at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java1442)
        at com.salesforce.quickstart.task.resetCase(task.java:354)
        at com.salesforce.quickstart.task.<init>(task.java:72)
        at com.salesforce.quickstart.task.main(task.java:47)

 

benjasikbenjasik
This is a problem on our end.

One thing you could do to help us track this down: Try to create a report or filter on this custom field and you should get the internal server error page. That will give us more information to help us track it down
Venk_ModelMetriVenk_ModelMetri

Hi,

 

The Query is running okay for me in the form of a report.

 

ID of the report is 00O00000006pZqv

I am sending this the code to Francisco from Salesforce.

 

Thanks

Venk

 

Ron HessRon Hess

I am also getting

java.sql.SQLException: ORA-01722: invalid number

from the server when i try to query using a custom field in the filter of a SOQL query statement

"select id , MMSImplementationFee__c from Opportunity where MMSImplementationFee__c > 1.0 "

This is using 3.0 or 4.0 api

I tried from perl, and via the COM office object, same error reported back from the server

I tried numbers and currency fields, has anyone else found / solved a problem like this ?