You need to sign in to do that
Don't have an account?

retrieve records from empty / null decimal
looks like if i set a fields value to null, then query the table for those records, they dont get returned. because a decimal thats null isnt actually null??
// get records
// are they null: nope
// well then what are they? theyre null
smh
Account bad_data = [SELECT Id, Name, Latitude__c, Longitude__c, Location__latitude__s, Location__longitude__s FROM Account WHERE Id IN ('0018000000mZrLUAA0')][0]; system.debug(bad_data); system.debug('bad_data.Latitude__c = null ? ' + bad_data.Latitude__c == null); system.debug('bad_data.Longitude__c = null ? ' + bad_data.Longitude__c == null); system.debug('bad_data.Location__latitude__s = null ? ' + bad_data.Location__latitude__s == null); system.debug('bad_data.Location__longitude__s = null ? ' + bad_data.Location__longitude__s == null); system.debug('bad_data.Latitude__c ? ' + String.valueOf(bad_data.Latitude__c)); system.debug('bad_data.Longitude__c ? ' + String.valueOf(bad_data.Longitude__c)); system.debug('bad_data.Location__latitude__s ? ' + String.valueOf(bad_data.Location__latitude__s)); system.debug('bad_data.Location__longitude__s ? ' + String.valueOf(bad_data.Location__longitude__s));
// get records
// are they null: nope
// well then what are they? theyre null
smh
is its not null but when i try to output it, its says null
how am i supposed to query to target these records??
with the second set of surrounding para's, you get the right results: true in all cases. Don't know if that will help or not, just something I noticed. If you have some code to share, I'm sure the community would be happy to help out.