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
Cherrice Browne 10Cherrice Browne 10 

My SOQL Query Not returning expected results

SOQL Query:
SELECT ClaimNumber__c, Program__c, ProgramDesc__C , ClaimStartDate__c, ClaimEndDate__c
FROM ClaimHeader__x WHERE (ClaimNumber__c = '13128E' AND  ProgramDesc__c = 'STAR') OR (ClaimNumber__c = '13128E' AND ProgramDesc__c = 'CHIP')  ORDER BY ClaimStartDate__c DESC LIMIT 11 OFFSET 0
                
We are expecting only one record for this query with claim number '13128E', but it is returning more records.
 
Dan Dodd 3Dan Dodd 3
Try LIMIT 1. Might be a type where you have LIMIT 11
@anilbathula@@anilbathula@
Hi Cherrice Browne,

Check the records with claim number ='13128E' have ProgramDesc as 'Star' and 'Chip' values.

Thanks
Anil.B