I'm getting this error for the SQL below:
Violation of PRIMARY KEY constraint. Cannot insert duplicate key.
Select DISTINCT
SubscriberKey,
Source
From (
Select
Email,
et4ae5__HasOptedOutOfMobile__c as SubscribeSMS,
HasOptedOutOfEmail as SubscribeEmail,
Subscriber_ID__c as SubscriberKey,
'lead' as Source
from lead_Salesforce
Union ALL
Select
Email,
Unique_ID__c As SubscriberKey,
'Contact' as Source,
FirstName,
LastName
from Contact_Salesforce
) as tab
Where SubscriberKey IS NOT NULL
AND SubscriberKey != ''