I have a table that contains multiple records for multiple dates.
I am trying to see the difference between \"date 1\" and \"date 2\" and my full outer join is not r
The where is killing the outer join.
A column cannot be both null and = to a value.
Put the conditions in the join.
SELECT COALESCE(c.AccountBranch, p.AccountBranch)
, COALESCE(c.AccountNumber, p.AccountNumber)
, COALESCE(c.AccountSuffix, p.AccountSuffix)
, c.PrincipleAmount, p.PrincipleAmount
FROM cb_account_extension_principle_dpd c
FULL OUTER JOIN cb_account_extension_principle_dpd p
ON p.AccountBranch = c.AccountBranch
AND p.AccountNumber = c.AccountNumber
AND p.AccountSuffix = c.AccountSuffix
AND c.BusinessDataDate = @CurrentBusinessDataDate
AND p.BusinessDataDate = @PreviousBusinessDataDate