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
Spencer_BerkSpencer_Berk 

SOQL Query to query the email field with values that contain at least two @ symbols?

I have some instances of two email addresses being entered in the Email field in Salesforce. What would a SOQL query look like that querys any Email field value that contains two or more @ symbols?
Abdul KhatriAbdul Khatri
Hi Spencer,

I am not sure how that gets possible. I don't think Salesforce allows you to enter multiple Email Addresses in the Email field. Can you share some examples? Here is an example of SOQL of the possible solution
 
SELECT Id FROM SOBJECT WHERE EMAILFIELD  LIKE '%@%@%'
I am still wondering but you can use the above SOQL though.

Regards,
Abdul Aziz Khatri

 
SubratSubrat (Salesforce Developers) 
Hello ,

For further reference you can refer this article -> https://www.forcetree.com/2016/10/query-salesforce-attachments-files-apex.html

Hope it helps !
Thank you.