You need to sign in to do that
Don't have an account?
vs94063
Issue with using "double" type field in the query WHERE clause.
Hi,
In one of my object i has a field whose FieldType is "double" with a precision of 18 and a scale of 0.
When I use this field in the query WHERE clause "double_field1 = 12312312312", running the query fails with an error "MALFORMED_QUERY" but when i use the WHERE clause "double_field1 = 12312312312", it query runs fine (note that this value is one digit less than the previous one).
I was expecting that i should be able to supply an 18-digit number as the filter value (since the precision was 18 and scale was 0), is my understanding correct?
Let me know how to fix this issue.
Thank you
In one of my object i has a field whose FieldType is "double" with a precision of 18 and a scale of 0.
When I use this field in the query WHERE clause "double_field1 = 12312312312", running the query fails with an error "MALFORMED_QUERY" but when i use the WHERE clause "double_field1 = 12312312312", it query runs fine (note that this value is one digit less than the previous one).
I was expecting that i should be able to supply an 18-digit number as the filter value (since the precision was 18 and scale was 0), is my understanding correct?
Let me know how to fix this issue.
Thank you
Select Id, IsDeleted, AccountId, IsPrivate, Name, Description, StageName, Amount, Probability, ExpectedRevenue, TotalOpportunityQuantity, CloseDate, Type, NextStep, LeadSource, IsClosed, IsWon, ForecastCategory, ForecastCategoryName, CampaignId, HasOpportunityLineItem, Pricebook2Id, OwnerId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastActivityDate, FiscalQuarter, FiscalYear, Fiscal, DeliveryInstallationStatus__c, TrackingNumber__c, OrderNumber__c, CurrentGenerators__c, MainCompetitors__c From Opportunity Where TotalOpportunityQuantity = 12312312312
Please note that TotalOpportunityQuantity field's FieldType is "double" with a precision of "18" and a scale of "2".
But in the Where clause, if i use "TotalOpportunityQuantity = 1231231231", it works fine.
Thanks
This will map the value passed in the query to the value you seek to fetch!
Message Edited by Losintikfos on 10-07-2008 01:06 AM
OR perhaps hold the double value to a Variable like;
And pass toquat to the query statement as parameter! i know it is possible this will arrive at same error but no harm in trying.
B
Message Edited by Losintikfos on 10-08-2008 01:16 AM