this one sums the RMD field
Code:
SELECT IRADetails.FullName, IRADetails.AccountNumber AS [Acct#], IRADetails.Age, IRADetails.AccountNumber, Sum(IRADetails.Amount) AS Amount, IRADetails.Company, [IRA RMD Table].Multiplier AS Mult, [Amount]/[Multiplier] AS RMD, IRADetails.DOB, IRADetails.Last4SSMasked, IRADetails.Automated, IRADetails.Complete, IRADetails.Scheduled, IRADetails.ScheduledDate, IRADetails.RMDTypeFROM IRADetails LEFT JOIN [IRA RMD Table] ON IRADetails.Age = [IRA RMD Table].Age
GROUP BY IRADetails.FullName, IRADetails.Age, IRADetails.AccountNumber, IRADetails.Company, [IRA RMD Table].Multiplier, [Amount]/[Multiplier], IRADetails.DOB, IRADetails.Last4SSMasked, IRADetails.Automated, IRADetails.Complete, IRADetails.Scheduled, IRADetails.ScheduledDate, IRADetails.RMDType, IRADetails.AccountNumber
HAVING (((IRADetails.Age)>71));
this ones does not sum the RMD field
Code:
SELECT IRADetails.FullName, IRADetails.AccountNumber AS [Acct#], IRADetails.Age, IRADetails.AccountNumber, Sum(IRADetails.Amount) AS Amount, IRADetails.Company, [IRA RMD Table].Multiplier AS Mult, [Amount]/[Multiplier] AS RMD, IRADetails.DOB, IRADetails.Last4SSMasked, IRADetails.Automated, IRADetails.Complete, IRADetails.Scheduled, IRADetails.ScheduledDate, IRADetails.RMDTypeFROM IRADetails LEFT JOIN [IRA RMD Table] ON IRADetails.Age = [IRA RMD Table].Age
GROUP BY IRADetails.FullName, IRADetails.Age, IRADetails.AccountNumber, IRADetails.Company, [IRA RMD Table].Multiplier, [Amount]/[Multiplier], IRADetails.DOB, IRADetails.Last4SSMasked, IRADetails.Automated, IRADetails.Complete, IRADetails.Scheduled, IRADetails.ScheduledDate, IRADetails.RMDType, IRADetails.AccountNumber
HAVING (((IRADetails.Age)>71));
any ideas?