漫长的夜晚,我正在努力解决这个问题。
我有一个查询,它返回具有相同结果的多行。
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