C
chippyles
Guest
I have a table that contains records about manufacturing lines.
The left two chars of the Line field is the line the rest identify the sample.
The top two records are linked together. This is a test that occurred twice for the same sample. The top record shows the /F. I need to be able to create a query that will look for these two records throughout a table and take the XR fields for the two records and average them together.
DATE_CREATED TIME_CREATED Line XR
01/16/06 12:12:46 26-97/F 13.9503
01/16/06 12:11:18 26-97 11.255
01/16/06 06:24:26 26-96/F 12.6171
01/16/06 06:22:56 26-96 9.9299
01/16/06 03:59:36 26-95/F 12.7588
01/16/06 03:58:02 26-95 10.2075
01/16/06 02:48:38 26-94/F 8.4566
01/16/06 02:47:04 26-94 7.1909
I would technically want to produce a query that would produce this.
DATE_CREATED TIME_CREATED Line XR Average
01/16/06 0:00:00 26-97 12.60265
01/16/06 0:00:00 26-96 11.2735
01/16/06 0:00:00 26-95 11.48315
01/16/06 0:00:00 26-94 7.82375
What do you think? Could I have a trigger method run everytime new records are added to this table so the performance will not slow the server down?
The left two chars of the Line field is the line the rest identify the sample.
The top two records are linked together. This is a test that occurred twice for the same sample. The top record shows the /F. I need to be able to create a query that will look for these two records throughout a table and take the XR fields for the two records and average them together.
DATE_CREATED TIME_CREATED Line XR
01/16/06 12:12:46 26-97/F 13.9503
01/16/06 12:11:18 26-97 11.255
01/16/06 06:24:26 26-96/F 12.6171
01/16/06 06:22:56 26-96 9.9299
01/16/06 03:59:36 26-95/F 12.7588
01/16/06 03:58:02 26-95 10.2075
01/16/06 02:48:38 26-94/F 8.4566
01/16/06 02:47:04 26-94 7.1909
I would technically want to produce a query that would produce this.
DATE_CREATED TIME_CREATED Line XR Average
01/16/06 0:00:00 26-97 12.60265
01/16/06 0:00:00 26-96 11.2735
01/16/06 0:00:00 26-95 11.48315
01/16/06 0:00:00 26-94 7.82375
What do you think? Could I have a trigger method run everytime new records are added to this table so the performance will not slow the server down?