I'm looking to write a SQL Query to get the CustomerID from Pot A and Pot B with a distinguish label so I can see that CustomerID 123 comes from A and CustomerID 234 comes from B.
I have the following data extensions.
Main DE
CustomerID(PK) |
123
234
Pot A
CustomerID(PK) | ReminderOn|
123
Pot B
CustomerID(PK) | ReminderOFF|
234
Pot A&B
CustomerID(PK) | ReminderOFF| ReminderOn
The way I thought to do this is to add a new column(ReminderOn, ReminderOFF) in each pot and set the CustomerID as the new column created but it doesn't work, I get 0 records. What am I doing wrong?
SELECT
md.CustomerID,
pa.CustomerID as ReminderOn,
pb.CustomerID as ReminderOFF
FROM [Main DE] md
JOIN [Pot A] pa
ON md.CustomerID = pa.CustomerID
JOIN [Pot B] pb
ON md.CustomerID = pb.CustomerID