1

This is the Query I tried I am getting error stating Invalid Column Name "PhoneNumber" where I do have that Field presented in my List and Data extension also. What I am missing here, can someone help me out in this.

SELECT
    ea.Name, 
    ea.PhoneNumber,
    ea.Last Name,
    ea.First Name,
    ea.Email Address,
    ea.Gender,
    ea.Test,
    ea.PAN,
    ea.DateofBirth,
    ea.ZipCode,
    ea.Qualification,
    ea.Country,
    ea.Age,
    ea.SubscriberKey,
    AddedBy,
    AddMethod,
    CreatedDate,
    DateUnsubscribed,
    EmailAddress,
    ListID,
    ListName,
    ListType,
    Status,
    SubscriberID,
    SubscriberKey,
    SubscriberType
FROM _ListSubscribers ls
LEFT JOIN ent._EnterpriseAttribute ea ON ea._SubscriberID = ls.SubscriberID
WHERE ListID = 3200

1 Answer 1

1

Column names that contain spaces must be captured with squared brackets. I have added them to Last Name and First Name in the SQL below:

SELECT
    ea.Name, 
    ea.PhoneNumber,
    ea.[Last Name],
    ea.[First Name],
    ea.Email Address,
    ea.Gender,
    ea.Test,
    ea.PAN,
    ea.DateofBirth,
    ea.ZipCode,
    ea.Qualification,
    ea.Country,
    ea.Age,
    ea.SubscriberKey,
    AddedBy,
    AddMethod,
    CreatedDate,
    DateUnsubscribed,
    EmailAddress,
    ListID,
    ListName,
    ListType,
    Status,
    SubscriberID,
    SubscriberKey,
    SubscriberType
FROM _ListSubscribers ls
LEFT JOIN ent._EnterpriseAttribute ea ON ea._SubscriberID = ls.SubscriberID
WHERE ListID = 3200
2
  • My Email Address field is required one in my Data Extension, still getting the same error but Ill try that out other then that its working now thanks for the needful from you man Rachid Mamai.
    – Vinu
    Mar 28 at 10:13
  • Glad it helped, don't forget to click on the checkmark to mark it as answered. Mar 28 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .