M
misschanda via AccessMonster.com
Hello,
I ran into a problem in writing my sql.
In my crosstab query I am getting a count of the result instead of the
actual result. Is there a Value or etc to yield actual result instead of
using count.
For example instead of reporting the 2.31 grams for the Result of water, I am
getting a count indicating water was checked or measured.
Also the below query should only return 6 fields and 96 are being returned. I
added Select Distinct.
Any help appreciated
TRANSFORM count(results.numericresult) AS countOfnumericResult
SELECT orderdetails.orderid, orderdetails.SampleNumber, orderdetails.Matrix,
Duke_Samples_Transformer.Manufacturer, results.Qualifier, results.Units,
results.RepLimit, count(results.numericResult) AS [value Of numericResult],
results.Result
FROM (orderdetails INNER JOIN results ON (orderdetails.SampleNumber = results.
SampleNumber) AND (orderdetails.OrderID = results.OrderID)) INNER JOIN
Duke_Samples_Transformer ON (results.SampleNumber = Duke_Samples_Transformer.
SampleNumber) AND (results.OrderID = Duke_Samples_Transformer.OrderID)
WHERE (((orderdetails.Matrix) Like "TRans*") AND ((orderdetails.
OrderDetails_User4) Is Null) AND ((orderdetails.SampleNumber) Not In (SELECT
DISTINCT Results.SampleNumber FROM Results WHERE Results.ResultStatus < 3))
GROUP BY orderdetails.orderid, orderdetails.SampleNumber, orderdetails.Matrix,
Duke_Samples_Transformer.Manufacturer, results.Qualifier, results.Units,
results.RepLimit, results.Result
PIVOT [results.param];
I ran into a problem in writing my sql.
In my crosstab query I am getting a count of the result instead of the
actual result. Is there a Value or etc to yield actual result instead of
using count.
For example instead of reporting the 2.31 grams for the Result of water, I am
getting a count indicating water was checked or measured.
Also the below query should only return 6 fields and 96 are being returned. I
added Select Distinct.
Any help appreciated
TRANSFORM count(results.numericresult) AS countOfnumericResult
SELECT orderdetails.orderid, orderdetails.SampleNumber, orderdetails.Matrix,
Duke_Samples_Transformer.Manufacturer, results.Qualifier, results.Units,
results.RepLimit, count(results.numericResult) AS [value Of numericResult],
results.Result
FROM (orderdetails INNER JOIN results ON (orderdetails.SampleNumber = results.
SampleNumber) AND (orderdetails.OrderID = results.OrderID)) INNER JOIN
Duke_Samples_Transformer ON (results.SampleNumber = Duke_Samples_Transformer.
SampleNumber) AND (results.OrderID = Duke_Samples_Transformer.OrderID)
WHERE (((orderdetails.Matrix) Like "TRans*") AND ((orderdetails.
OrderDetails_User4) Is Null) AND ((orderdetails.SampleNumber) Not In (SELECT
DISTINCT Results.SampleNumber FROM Results WHERE Results.ResultStatus < 3))
GROUP BY orderdetails.orderid, orderdetails.SampleNumber, orderdetails.Matrix,
Duke_Samples_Transformer.Manufacturer, results.Qualifier, results.Units,
results.RepLimit, results.Result
PIVOT [results.param];