I am writing a batch job, and got stuck. I am trying to create a list 1, and then another list 2, but want to identify only the records in list 2 that match a field in list 1.
Here is an example of what I am trying to do. I think I must use a for loop to accomplish what I am looking for:
map<id,FEMA_DATA__c> setFemaDataId = new map<id,FEMA_DATA__c>([Select id, FEMA_ID__c From FEMA_DATA__c]); case cafd = [Select id, FEMA_ID__c, AccountId From Case Where FEMA_ID__c = :femadatalist.FEMA_ID__c];