Blog

Blog » 2019 » December » 17 » Contact Extract
00:22
Contact Extract

WHERE Brand_Name__c != 'Etude' AND RecordTypeId = '012E000000066VlIAI' AND LastModifiedDate < 2020-03-03T00:00:00.000+0000

 

Select LastModifiedDate from Contact WHERE LastModifiedDate < 2020-03-03T00:00:00.000+0000 LIMIT 2
 

Select AccountId, Id, Brand_Name__c , FirstName, LastName, Company__c, Email, Phone, MobilePhone, HomePhone, OtherPhone, Phone_1__c, Phone_2__c, SMS_phone__c, Birthdate, HasOptedOutOfEmail, IsEmailBounced, Email_Actionable__c, Total_Order_Value__c, Last_Order_Date__c, Active_Club_Memberships__c FROM Contact where RecordTypeId = '012E000000066VlIAI' AND (Brand_Name__c = 'Beringer' OR Brand_Name__c = 'Stags Leap' OR Brand_Name__c = 'BV' OR Brand_Name__c = 'Sterling' OR Brand_Name__c = 'Chateau St. Jean' OR Brand_Name__c = 'Provenance Vineyards' OR Brand_Name__c = 'Hewitt' OR Brand_Name__c = 'Hewitt')

FROM Club_Member__c WHERE Brand__c = 'Etude' AND Club_Membership_Status__c = 'Active' LIMIT 1

 

 

FROM Contact where RecordTypeId = '012E000000066VlIAI' AND (Brand_Name__c = '19 Crimes' OR Brand_Name__c = 'Acacia' OR Brand_Name__c = 'Cavalieredoro' OR Brand_Name__c = 'Cellar360' OR Brand_Name__c = 'Chateau St. Jean' OR Brand_Name__c = 'Embrazen' OR Brand_Name__c = 'Main & Vine' OR Brand_Name__c = 'Maison De Grand Esprit' OR Brand_Name__c = 'Meridian Vineyards' OR Brand_Name__c = 'Penfolds US' OR Brand_Name__c = 'St. Clement' OR Brand_Name__c = 'The Cellar' OR Brand_Name__c = 'The Walking Dead Wine' OR Brand_Name__c = 'Treasury Wine Event')
 

 

**

Select Id FROM Club_Member__c Where Club__r.Migrate__c = TRUE  and isActive__c = TRUE