You need to sign in to do that
Don't have an account?
Database Query Problem
Hi ,
I have a field with decimal type. i m filtering it in my query , it is giving me following error.
System.QueryException: value of filter criterion for field 'Price__c' must be of type double and should not be enclosed in quotes
Price__c is currency type
and price is deimal type and i have tried double also
Follwoing Query i m excuting -:
string property ='Select p.Vacant_or_Occupied__c, p.Property_Type__c, p.Price__c, p.Name, p.Location__c, p.Bedrooms__c, p.Available__c From Property__c p where Name != null';
if(price != null){
property += ' And Price__c = \''+price+'\'';
}
database.query(property);
Thanks
Shailu
property += ' And Price__c = '+price;
this will works for you! let me know!
baskaran