D
DawnTreader
Hello All
i have this query
....
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"Cooling Method" AS FieldName,
IIf([CoolingMethod] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"1st Stage Configuration" AS FieldName,
IIf([1stStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"2nd Stage Configuration" AS FieldName,
IIf([2ndStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"3rd Stage Configuration" AS FieldName,
IIf([3rdStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"4th Stage Configuration" AS FieldName,
IIf([4thStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"5th Stage Configuration" AS FieldName,
IIf([5thStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor;
and i need to determine first if how many stages a PID has like this:
SELECT subdatatblCompressor.CompressorID, subdatatblCompressor.ProductID, subdatatblCompressor.Stages
FROM subdatatblCompressor
WHERE (((subdatatblCompressor.Stages) Is Not Null));
and then determine if i need the query to do the stage in the previous query.
i hope that makes sense. how would i do that? am i going to need a sub query? seperate query?
any and all help appreciated.
i have this query
....
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"Cooling Method" AS FieldName,
IIf([CoolingMethod] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"1st Stage Configuration" AS FieldName,
IIf([1stStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"2nd Stage Configuration" AS FieldName,
IIf([2ndStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"3rd Stage Configuration" AS FieldName,
IIf([3rdStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"4th Stage Configuration" AS FieldName,
IIf([4thStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor
UNION ALL SELECT
subdatatblCompressor.ProductID AS PID,
"Compressor Data" AS Category,
"5th Stage Configuration" AS FieldName,
IIf([5thStageConfig] Is Null,0,1) AS Complete
FROM subdatatblCompressor;
and i need to determine first if how many stages a PID has like this:
SELECT subdatatblCompressor.CompressorID, subdatatblCompressor.ProductID, subdatatblCompressor.Stages
FROM subdatatblCompressor
WHERE (((subdatatblCompressor.Stages) Is Not Null));
and then determine if i need the query to do the stage in the previous query.
i hope that makes sense. how would i do that? am i going to need a sub query? seperate query?
any and all help appreciated.