Hi All,
In a table (dbo.UnquotedContacts) I have few columns from where I am trying to extract few columns. But My crcern is as follows
IF the field 'Date_ABC_Updated' is NOT empty AND the field 'subscribed_to_Business_XL' = 'SUB', the contact has an ACTIVE BXL subscription
IF the field 'Date_ABC_Updated' is NOT empty AND the field 'subscribed_to_Business_XL' does NOT contain a value (IS EMPTY), the the contact has an INACTIVE BXL subscription. I have tried a query
SELECT source,
unique_contact_code,
bxl_amount_paid,Date_ABC_Updated,
(Case
WHEN Date_ABC_Updated IS not null and Subscribed_to_Business_XL is null then 'Active'
when Date_ABC_Updated IS not null and Subscribed_to_Business_XL IS null then 'Inactive'
End )
Subscribed_to_Business_XL,
Audit_Q,
Name_of_Company_Requestee,
Job_Title_of_Company_Requestee,
bxl_sub_type,
bxl_amount_paid
FROM dbo.UnquotedContacts
But it is not working
Please help!!!!