K
kramer31
Hi. I'm not even sure that this is possible, but here's my
situation. I have data whose attributes may increase as follows.
Table Defects
Integer: StepId
Integer: DefectType
Double: AmountOfDefects
Table StepInfo
Integer: StepId
Text: StepName
Table DefectInfo
Integer: DefectType
Text: DefectName
Now Defects.DefectType links to DefectInfo.DefectType and
Defects.StepId links to StepInfo.StepId. Both are integers that start
with 1 and go up to N.
I need to write at least a query and preferably a report (although I'm
not sure that's even possible) that joins these three tables and that
has the following columns:
StepName Defects1 Defects2 Defects3 Defects4 ... DefectsN
where Defects1 is the AmountOfDefects in the record in the table
Defects such that Defects.DefectType=1. And StepName is the StepName
from the table StepInfo that has the StepId that corresponds to the
StepId in the table Defects. And there should be a DefectsX column
for each record in the table DefectsInfo regardless of whether there
is a corresponding record in the table defects (but that value should
be zero).
Is it even possible to generate columns in a query from values in a
table?
Thanks.
situation. I have data whose attributes may increase as follows.
Table Defects
Integer: StepId
Integer: DefectType
Double: AmountOfDefects
Table StepInfo
Integer: StepId
Text: StepName
Table DefectInfo
Integer: DefectType
Text: DefectName
Now Defects.DefectType links to DefectInfo.DefectType and
Defects.StepId links to StepInfo.StepId. Both are integers that start
with 1 and go up to N.
I need to write at least a query and preferably a report (although I'm
not sure that's even possible) that joins these three tables and that
has the following columns:
StepName Defects1 Defects2 Defects3 Defects4 ... DefectsN
where Defects1 is the AmountOfDefects in the record in the table
Defects such that Defects.DefectType=1. And StepName is the StepName
from the table StepInfo that has the StepId that corresponds to the
StepId in the table Defects. And there should be a DefectsX column
for each record in the table DefectsInfo regardless of whether there
is a corresponding record in the table defects (but that value should
be zero).
Is it even possible to generate columns in a query from values in a
table?
Thanks.