Crosstab Query Help

  • Thread starter Thread starter EAB1977
  • Start date Start date
E

EAB1977

Is there a way to get rid of nulls from the PIVOT section of a
corsstab query? I have many Tests in the below crosstab query,
seperated by TestIDs. For a certain TestID, I'd like to have the Nulls
removed. Is this possible?

TRANSFORM First(qryVDRProductionRuns.TestValue) AS FirstOfTestValue
SELECT qryVDRProductionRuns.PlantCode,
qryVDRProductionRuns.ProductCode, qryVDRProductionRuns.PositionRow,
qryVDRProductionRuns.ProductionDate
FROM qryVDRProductionRuns
GROUP BY qryVDRProductionRuns.PlantCode,
qryVDRProductionRuns.ProductCode, qryVDRProductionRuns.PositionRow,
qryVDRProductionRuns.ProductionDate, qryVDRProductionRuns.PlantCode,
qryVDRProductionRuns.ProductionDate, qryVDRProductionRuns.ProductCode
ORDER BY qryVDRProductionRuns.PlantCode,
qryVDRProductionRuns.ProductionDate, qryVDRProductionRuns.ProductCode
PIVOT qryVDRProductionRuns.TestID;
 
"Nulls" are somewhat like nothing so they aren't really there to get rid of.
Can you tell us what you actually are returning in the query and what your
really want to return?
 
"Nulls" are somewhat like nothing so they aren't really there to get rid of.
Can you tell us what you actually are returning in the query and what your
really want to return?

What I am returning in my query is PlantCode, ProductCode,
PositionRow, ProductionDate, and the value if the TestID. TestID is
just a number for the tests. I have about 5 TestIDs currently in this
crosstab query (I filtered those out in another query). One of my
TestIDs is 254. Basically, if TestID 254 Is Null then I do not want
that row to display, otherwise display the row.
 
So, if the value of Test ID is 254, you don't want that row to display in
your crosstab? If so, I would create a query of all the codes etc that do
contain a testID of 254 and join that to your crosstab.
 
Apparently I am totally confused and you don't seem to be helping out by
providing any clarification. Hopefully someone else can guess at what you
have and what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top