SELECT
G.ID "Gift ID",
CONVERT(VARCHAR(30), G.DTE, 101) "Gift Date",
G.Amount "Gift Amount",
R.CONSTITUENT_ID "Constituent ID",
R.FIRST_NAME "First Name",
R.LAST_NAME "Last Name",
T_3.CONSTITUENT_ID "Soft Credit Recipient ID",
SPOUSE.FIRST_NAME "Spouse First Name",
SPOUSE.LAST_NAME "Spouse Last Name",
GSC.Amount "Soft Credit Amount"

FROM
DBO.GIFT AS G
INNER JOIN DBO.CONSTIT_GIFTS AS CG ON G.ID = CG.GIFT_ID
INNER JOIN DBO.RECORDS AS R ON CG.CONSTIT_ID = R.ID
LEFT OUTER JOIN DBO.RECORDS SPOUSE ON SPOUSE.ID = R.SPOUSE_ID
INNER JOIN DBO.GIFTSOFTCREDIT AS GSC ON G.ID = GSC.GIFTID
LEFT OUTER JOIN DBO.RECORDS AS T_3 ON GSC.CONSTITID = T_3.ID

WHERE
(((G.TYPE NOT IN ('28','32','33')
OR
(G.TYPE IS NULL))))
AND GSC.CONSTITID = SPOUSE.ID