G
Guest
I have a query that gets the following information from my tables
ProductName, Voltage, Current, Peak, TargetDifference
(Peak and target are the same unit)
I have created an additional query to retrieve the Peak that is closest to
the Target for each ProductName. The problem is that it is important to
display the corresponding Voltage and Current readings. When I try to set
this up I get the following error. "You tried to execute a query that does
not include the specified expresson 'Peak' as part of an aggregate function"
This is what I have so far that works the way I want it to.
SELECT [Flux Density Query].ProductName,MIN([Flux Density
Query].TargetDifference)
FROM [Flux Density Query]
GROUP BY ProductName;
This is the result from this.
ProductName TargetDifference
XXXX .01
YYYY .014
I would like it to look like this.
ProductName Voltage Current Peak TargetDifference
XXXX 2000 2000 2.735 .035
YYYY 3000 3000 1.356 .006
etc.
ProductName, Voltage, Current, Peak, TargetDifference
(Peak and target are the same unit)
I have created an additional query to retrieve the Peak that is closest to
the Target for each ProductName. The problem is that it is important to
display the corresponding Voltage and Current readings. When I try to set
this up I get the following error. "You tried to execute a query that does
not include the specified expresson 'Peak' as part of an aggregate function"
This is what I have so far that works the way I want it to.
SELECT [Flux Density Query].ProductName,MIN([Flux Density
Query].TargetDifference)
FROM [Flux Density Query]
GROUP BY ProductName;
This is the result from this.
ProductName TargetDifference
XXXX .01
YYYY .014
I would like it to look like this.
ProductName Voltage Current Peak TargetDifference
XXXX 2000 2000 2.735 .035
YYYY 3000 3000 1.356 .006
etc.