G
gls858
I have the following query where the Group By value
ECNHDetail.Department is a four digit value. Is is possible to change
this query to group by is based only on the first three characters of
the dept.
Example. I have depts 101a,101b,101c but I want all of the 101's group
together.
SELECT ECNHDetail.GLLocation, ECNHDetail.CustomerNumber,
ECNHDetail.Department, Sum(ECNHDetail.LineAvgCost) AS SumOfLineAvgCost,
Sum(ECNHDetail.LineAmount) AS SumOfLineAmount
FROM ECNHDetail
WHERE (((ECNHDetail.InvoiceDate) Between #1/1/2009# And #6/30/2009#))
GROUP BY ECNHDetail.GLLocation, ECNHDetail.CustomerNumber,
ECNHDetail.Department
HAVING (((ECNHDetail.GLLocation)=" 1") AND ((ECNHDetail.CustomerNumber)
Like "*3584"))
ORDER BY Sum(ECNHDetail.LineAmount) DESC;
gls858
ECNHDetail.Department is a four digit value. Is is possible to change
this query to group by is based only on the first three characters of
the dept.
Example. I have depts 101a,101b,101c but I want all of the 101's group
together.
SELECT ECNHDetail.GLLocation, ECNHDetail.CustomerNumber,
ECNHDetail.Department, Sum(ECNHDetail.LineAvgCost) AS SumOfLineAvgCost,
Sum(ECNHDetail.LineAmount) AS SumOfLineAmount
FROM ECNHDetail
WHERE (((ECNHDetail.InvoiceDate) Between #1/1/2009# And #6/30/2009#))
GROUP BY ECNHDetail.GLLocation, ECNHDetail.CustomerNumber,
ECNHDetail.Department
HAVING (((ECNHDetail.GLLocation)=" 1") AND ((ECNHDetail.CustomerNumber)
Like "*3584"))
ORDER BY Sum(ECNHDetail.LineAmount) DESC;
gls858