Last post Apr 03, 2018 06:43 PM by StrangerMike
Apr 03, 2018 06:17 PM|StrangerMike|LINK
I have two queries that return a list of email addresses using different where statements,
I want to return a single column that has the results of the two queries combined.
Also if one of the two queries do not return anything I still want the second to return data.
something like this:
EmailAddress from Email_Addresses
This works but if either is not found nothing is returned.
Apr 03, 2018 06:34 PM|ryanbesko|LINK
Use ISNULL to you still get a value from both expressions. When you combine fields together with + and any of them are null, the final result is null.
ISNULL(x.EmailAddress, '') + ',' + ISNULL(y.EmailAddress, '')
Apr 03, 2018 06:43 PM|StrangerMike|LINK