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
Es45Es45 

SOQL Get email domains

Im using a tool to write SOQL queries - very simple like
select * from contact

Is there a simple SOQL query I could use to get email domain in that query like
select email,[split email as domain] from contact
Best Answer chosen by Es45
VarSha ChouguleVarSha Chougule
Hi Es45,
There is currently no mechanism for splitting data in SOQL itself.
Although you can go with custom logic implementation to get the requirement fulfilled.
Thanks!

All Answers

VinayVinay (Salesforce Developers) 
Iam not sure about SOQL, however you can get email domain using formula in flow

https://salesforce-flowsome.com/get-email-domain-using-formula-in-flow/

Please mark as Best Answer if above information was helpful.

Thanks,
Es45Es45
Thanks but I need specifically for SOQL
Abdul KhatriAbdul Khatri
Hi Es45,

What are you trying to achieve?

It is not possible only through SOQL itself but If you can provide your requirment we may comeup with the solution that you might be looking for?
VarSha ChouguleVarSha Chougule
Hi Es45,
There is currently no mechanism for splitting data in SOQL itself.
Although you can go with custom logic implementation to get the requirement fulfilled.
Thanks!
This was selected as the best answer
Es45Es45
Thanks VarSha good to know so that I can stop pursuing this.