I have a comma separated list that I want to query but it is not working correctly. I am not entirely sure what I am doing wrong. My pAddress is a parm that I am passing in as a Set
for (String lstEmails : pAddress.split(','))
{
System.debug(Logginglevel.DEBUG , 'My Debug lstEmails :' + lstEmails) ;
List<String> strEmail = lstEmails.split(',');
System.debug(Logginglevel.DEBUG , 'My Debug strEmail :' + strEmail) ;
}
//get the user from the User Object
User user = [select email, firstName, lastName from User where email IN: pAddress];
The SOQL is not returning any rows. Do I have to format it differently?