L
Leslie W.
Good Morning! I have the following SQL statement:
SELECT AqryFYTDFundSumHrs.LastName & ", " & AqryFYTDFundSumHrs.FirstName AS
Name, IIf([WorkHours]=0,0,NZ([SumDHours],0)/NZ([WorkHours],0)) AS DirPer,
AqryFYTDFundSumHrs.DirBugPer, NZ([DirPer])-NZ([DirBugPer]) AS DirDif,
AqryFYTDFundSumHrs.SumOfHours, NZ([SumAHours],0) AS AAHours,
NZ([SumOfHours]-[AAHours],0) AS WorkHours, NZ([SumIHours],0) AS OHHours,
IIf([WorkHours]=0,0,NZ([SumIHours],0)/NZ([WorkHours],0)) AS OHPerc,
NZ([SumDHours],0) AS DHours
FROM ((AqryFYTDFundSumHrs LEFT JOIN AqryFYTDFundSumHrsA ON
AqryFYTDFundSumHrs.PSUID = AqryFYTDFundSumHrsA.PSUID) LEFT JOIN
AqryFYTDFundSumHrsD ON AqryFYTDFundSumHrs.PSUID = AqryFYTDFundSumHrsD.PSUID)
LEFT JOIN AqryFYTDFundSumHrsI ON AqryFYTDFundSumHrs.PSUID =
AqryFYTDFundSumHrsI.PSUID
ORDER BY NZ([DirPer])-NZ([DirBugPer]) DESC;
I just added the ORDER BY clause to the end of it, however, when I try to
run it, I get the error "Enter Parameter Value" for DirPer. I woudl like to
sort on DirDif, descending. What am I doing wrong?
Appreciate the help!
SELECT AqryFYTDFundSumHrs.LastName & ", " & AqryFYTDFundSumHrs.FirstName AS
Name, IIf([WorkHours]=0,0,NZ([SumDHours],0)/NZ([WorkHours],0)) AS DirPer,
AqryFYTDFundSumHrs.DirBugPer, NZ([DirPer])-NZ([DirBugPer]) AS DirDif,
AqryFYTDFundSumHrs.SumOfHours, NZ([SumAHours],0) AS AAHours,
NZ([SumOfHours]-[AAHours],0) AS WorkHours, NZ([SumIHours],0) AS OHHours,
IIf([WorkHours]=0,0,NZ([SumIHours],0)/NZ([WorkHours],0)) AS OHPerc,
NZ([SumDHours],0) AS DHours
FROM ((AqryFYTDFundSumHrs LEFT JOIN AqryFYTDFundSumHrsA ON
AqryFYTDFundSumHrs.PSUID = AqryFYTDFundSumHrsA.PSUID) LEFT JOIN
AqryFYTDFundSumHrsD ON AqryFYTDFundSumHrs.PSUID = AqryFYTDFundSumHrsD.PSUID)
LEFT JOIN AqryFYTDFundSumHrsI ON AqryFYTDFundSumHrs.PSUID =
AqryFYTDFundSumHrsI.PSUID
ORDER BY NZ([DirPer])-NZ([DirBugPer]) DESC;
I just added the ORDER BY clause to the end of it, however, when I try to
run it, I get the error "Enter Parameter Value" for DirPer. I woudl like to
sort on DirDif, descending. What am I doing wrong?
Appreciate the help!