data // SQLPRODUCTION
COALESCE() for Ordered Fallback Values
Choose the first non-null value from multiple candidate fields.
sqlcoalescenullfallback
Trust & provenancePRODUCTION
Evidence tierPRODUCTIONOfficial sources0Other sources0Last verified2026-10-05
Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.
Consolidating fields across sources.
Applying a clear fallback chain without nested CASE statements.
SELECT
SubscriberKey,
COALESCE(PreferredName, FirstName, 'Cliente') AS DisplayName
FROM [Customer_Master]COALESCE returns the first non-null expression in the order provided.
Empty strings are not NULL. Normalize them first if your data sources mix both states.