0
長夜,我正在努力解決這個問題。加入返回多個結果
我有一個查詢返回具有相同結果的多行。
SELECT apf_Members.AppsTitle, apf_Members.AppsFirstName, apf_Members.AppsLastName, vw_apf_MemStat.MemberID, vw_apf_MemStat.DNNUserID,
vw_apf_MemStat.MemStat_LapsedMember, vw_apf_MemStat.MemStat_CurrentMember, vw_apf_MemStat.MemStat_Unrenewed,
apf_Members.MemberID AS Member, apf_Members.PostalCompany AS Company, apf_Members.AppsFirstName AS FirstName,
apf_Members.AppsLastName AS LastName, apf_Members.AppsBirthDate AS DOB, apf_Members.PostalState AS State
FROM apf_Members INNER JOIN
vw_apf_MemStat ON apf_Members.MemberID = vw_apf_MemStat.MemberID INNER JOIN
vw_apf_AttributesConditions ON apf_Members.MemberID = vw_apf_AttributesConditions.MemberID
WHERE (vw_apf_MemStat.MemStat_CurrentMember <> - 1) AND (vw_apf_AttributesConditions.AttributeID = 7)
ORDER BY apf_Members.AppsLastName, State, apf_Members.MailOption
如何停止重複行?這些列對於每個重複行看起來完全一樣,所以它們肯定是重複的。
我假設它是2x內部連接,但我似乎無法修復它。
謝謝你們,
-R
你可以給樣品記錄?和結果的屏幕截圖。 –
你的數據中有重複嗎? – Orbling
選擇不同.... – Paparazzi