COALESCE and CONCAT Address Line 1 and Address Line 2 separated by a comma
We are trying to COALESCE and CONCAT Address Line 1 and Address Line 2 separated by a comma "," from potentially two data sources.
So like...123 Main St., Apt. 101
The first part is easy enough...
CONCAT (
COALESCE (
LTRIM (RTRIM ([Temp_Table_State_Funded_NonMedicaid_EDW_Member_Subset].[EDW_Address_AddressLine1])),
LTRIM (RTRIM ([#Temp_Table_State_Funded_NonMedicaid_EDW_Eligibility_Span].[EDW_MemberEligibility_CardAddress1])),
''
),
So how do we do the second part and COALESE and CONCAT based on the Address Line 2 being valued and preceded by a comma "," if Address Line 2 is from two different sources?