[SalesForce] Writting and Update Query from one Data Extension to another Data Extension

There is a Field called Program_Status in Data Extension (DE) [Recruiter High school Visits V2 - 2018-06-25T124653822] and I would like to update this field based on DE Program_Interest_G that has the field named [Status]

I tried the following TWO syntax:

Select 
Program_Interest_G.Status as [Program_Status]
FROM [Recruiter High school Visits V2 - 2018-06-25T124653822] v
LEFT JOIN Program_Interest_G ON v.Global_Program_of_Interest_1__c = Program_Interest_G.ProgramOfInterest

OR

Select 
Status as [Program_Status]
FROM Program_Interest_G

With both syntax error the same comment:

An error occurred saving the definition:
A problem occurred creating your query definition. Please contact Customer Service for additional information.
Name: Update Program 1 Status
External Key: Update_Program_1_Status
Error saving the Query field.Field 'Lead:Id' is a required for the Target Data Extension. Ensure this field is specified in your query text.

The issue is the first DE is just a list of Programs and the status of each program. Only the other DE that I'm trying to update has Lead.ID's

Best Answer

  • Create a new DE to and make sure all field that wont be part of the query are nullable.

  • Use this Query to copy the data into the new DE

    SELECT * From
    
    SchoolProgram ProgramOfInterest ProgramCode Status
    
    Target DE: Your new DE
    

Your query should work now

Related Topic