Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm a bit of a beginner at this and am trying to do a join between two tables
My script below seems to assign each contact every value of the Contact Record Type. Obviously each contact should only have one record type though.
Any ideas what i'm doing wrong?
QUALIFY *;
UNQUALIFY Activity.ConatctRecordTypeId;
UNQUALIFY Activity.AccountId;
UNQUALIFY Activity.ContactId;
UNQUALIFY Activity.Department_Role__c;
UNQUALIFY Activity.Business__c;
Contacts:
LOAD Id as Activity.ContactId,
AccountId AS Activity.AccountId,
Name,
RecordTypeId AS Activity.ConatctRecordTypeId,
CreatedDate,
Department_Role__c AS Activity.Department_Role__c,
Business__c AS Activity.Business__c,
Asset_Class__c,
Inactive_Contact__c,
Region__c;
SQL SELECT *
FROM Contact
WHERE RecordTypeId NOT IN ('012w000000063XQ','012w000000063qu');
UNQUALIFY *;
//Contact Record Types
QUALIFY *;
UNQUALIFY Activity.ContactRecordTypeId;
ContactRecordType:
LEFT JOIN (Contacts)
ContactRecordType:
LOAD Id AS Activity.ConatctRecordTypeId,
Name;
SQL SELECT *
FROM RecordType
WHERE SobjectType IN ('Contact');
UNQUALIFY *;
Could be a typo: LOAD Id AS Activity.ConatctRecordTypeId,
Check how you unqualify names - make sure you are using original names from data source. Check field names in Table viewr. And make sure Contact Record Type has exactly same name in both tables. Most probably, you have fields Activity.Activity.ConatctRecordTypeId and ContactRecordType.Activity.ConatctRecordTypeId
Could be a typo: LOAD Id AS Activity.ConatctRecordTypeId,
Where would I be without you Gysbert?!
thanks AGAIN