Q
QuantumLeap
I posted a question on 2/22/06 on this board about how I could combine three
tables in order to graph measurement data for a series of points as well as
their upper and lower spec limits. I am trying to follow along with the
response to that question and create the needed queries as shown below:
Queries to normalize measurements:
===quniMeasurements=======
SELECT Date, Series, "A" as Measurement, [Measurement A] as MeasureVal
FROM tblMeasurements
UNION ALL
SELECT Date, Series, "B", [Measurement B]
FROM tblMeasurements
UNION ALL
SELECT Date, Series, "C", [Measurement C]
FROM tblMeasurements
UNION ALL
SELECT Date, Series, "D", [Measurement D]
FROM tblMeasurements;
===quniLimits==============
SELECT "A" AS Measurement, tblLSL.[Measurement A] AS NewLSL,
tblUSL.[Measurement A] AS NewUSL
FROM tblUSL, tblLSL
UNION
SELECT "B", tblLSL.[Measurement B], tblUSL.[Measurement B]
FROM tblUSL, tblLSL
UNION
SELECT "C", tblLSL.[Measurement C], tblUSL.[Measurement C]
FROM tblUSL, tblLSL
UNION
SELECT "D", tblLSL.[Measurement D], tblUSL.[Measurement D]
FROM tblUSL, tblLSL;
Query that I should be able to graph:
===qselForGraph===========
SELECT quniMeasurements.Measurement,
quniMeasurements.Date, quniMeasurements.Series,
quniMeasurements.MeasureVal, quniLimits.NewLSL,
quniLimits.NewUSL
FROM quniLimits INNER JOIN quniMeasurements
ON quniLimits.Measurement = quniMeasurements.Measurement
ORDER BY quniMeasurements.Measurement,
quniMeasurements.Date, quniMeasurements.Series;
I double-checked my syntax but am getting the error message "Syntax error in
query. Incomplete query clause." When I try to save quniLimits and the error
message “The SQL statement includes a reserved word or an argument name that
is misspelled or missing, or the punctuation is incorrect.†What might be
the problem?
A portion of the measurement table:
Date Series Measurement A Measurent B Measurement C Measurement D
2/1/2006 2 0.034 -0.037 -0.635
0.01
2/1/2006 3 0.031 -0.011 -0.629
0.039
2/1/2006 4 0.024 -0.034 -0.662
0.028
2/1/2006 5 0.018 -0.017 -0.639
-0.024
2/1/2006 6 0.039 -0.01 -0.618
0.061
2/1/2006 7 0.022 -0.032 -0.643
-0.021
2/2/2006 2 0.061 -0.044 -0.634
0.053
2/2/2006 3 0.052 -0.016 -0.629
0.036
2/2/2006 4 0.008 -0.04 -0.649
0.035
2/2/2006 5 0.065 -0.011 -0.626
-0.019
A portion of the USL table:
Series Measurement A Measurement B Measurement C Measurement D
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
A portion of the LSL table:
Series Measurement A Measurement B Measurement C Measurement D
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
Thank you for your assistance.
tables in order to graph measurement data for a series of points as well as
their upper and lower spec limits. I am trying to follow along with the
response to that question and create the needed queries as shown below:
Queries to normalize measurements:
===quniMeasurements=======
SELECT Date, Series, "A" as Measurement, [Measurement A] as MeasureVal
FROM tblMeasurements
UNION ALL
SELECT Date, Series, "B", [Measurement B]
FROM tblMeasurements
UNION ALL
SELECT Date, Series, "C", [Measurement C]
FROM tblMeasurements
UNION ALL
SELECT Date, Series, "D", [Measurement D]
FROM tblMeasurements;
===quniLimits==============
SELECT "A" AS Measurement, tblLSL.[Measurement A] AS NewLSL,
tblUSL.[Measurement A] AS NewUSL
FROM tblUSL, tblLSL
UNION
SELECT "B", tblLSL.[Measurement B], tblUSL.[Measurement B]
FROM tblUSL, tblLSL
UNION
SELECT "C", tblLSL.[Measurement C], tblUSL.[Measurement C]
FROM tblUSL, tblLSL
UNION
SELECT "D", tblLSL.[Measurement D], tblUSL.[Measurement D]
FROM tblUSL, tblLSL;
Query that I should be able to graph:
===qselForGraph===========
SELECT quniMeasurements.Measurement,
quniMeasurements.Date, quniMeasurements.Series,
quniMeasurements.MeasureVal, quniLimits.NewLSL,
quniLimits.NewUSL
FROM quniLimits INNER JOIN quniMeasurements
ON quniLimits.Measurement = quniMeasurements.Measurement
ORDER BY quniMeasurements.Measurement,
quniMeasurements.Date, quniMeasurements.Series;
I double-checked my syntax but am getting the error message "Syntax error in
query. Incomplete query clause." When I try to save quniLimits and the error
message “The SQL statement includes a reserved word or an argument name that
is misspelled or missing, or the punctuation is incorrect.†What might be
the problem?
A portion of the measurement table:
Date Series Measurement A Measurent B Measurement C Measurement D
2/1/2006 2 0.034 -0.037 -0.635
0.01
2/1/2006 3 0.031 -0.011 -0.629
0.039
2/1/2006 4 0.024 -0.034 -0.662
0.028
2/1/2006 5 0.018 -0.017 -0.639
-0.024
2/1/2006 6 0.039 -0.01 -0.618
0.061
2/1/2006 7 0.022 -0.032 -0.643
-0.021
2/2/2006 2 0.061 -0.044 -0.634
0.053
2/2/2006 3 0.052 -0.016 -0.629
0.036
2/2/2006 4 0.008 -0.04 -0.649
0.035
2/2/2006 5 0.065 -0.011 -0.626
-0.019
A portion of the USL table:
Series Measurement A Measurement B Measurement C Measurement D
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
USL 0.06 0.09 0.08 0.08
A portion of the LSL table:
Series Measurement A Measurement B Measurement C Measurement D
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
LSL -0.06 -0.09 -0.08 -0.08
Thank you for your assistance.