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
ExploreForceExploreForce 

SOQL query: help

 Return list of potential contact based on
===========================================================================
1. derived email .@example.com-->(firstname+lastname@example.com)
2. and first initial of first name and full last name.(firstname(firstinitial) and lastname='fullname')
3. email provided on recruiting contact (email on contact)
====================================================================
contactList = [Select c.Id,c.My_Key_Partner__c,c.FirstName,c.LastName,c.Name,c.Email,
                                c.My_Contact__c,c.RD_Contact__c, c.User__c, c.RecordTypeId,
                                c.OwnerId, c.Owner.ManagerId
                                From Contact c
                                Where c.Id = : recontactId
                                or c.email=c.FirstName+c.LastName+'@scotiabank.com'
                                or c.FirstName= 'A%'  and c.LastName='%'
                                or c.email='%@%.com'];



Please help:
Thanks
Anoop yadavAnoop yadav
Hi,
Try with below code.
String emailId = c.FirstName+''+c.LastName+''+'@scotiabank.com';
ContactList = [Select c.Id,c.My_Key_Partner__c,c.FirstName,c.LastName,c.Name,c.Email,
                                c.My_Contact__c,c.RD_Contact__c, c.User__c, c.RecordTypeId,
                                c.OwnerId, c.Owner.ManagerId
                                From Contact c
                                Where c.Id = : recontactId
                                or c.email=:emailId
                                or c.FirstName= 'A%'  and c.LastName='%'
                                or c.email='%@%.com'];