
July 20th, 2012, 02:36 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 1
Time spent in forums: 43 m 57 sec
Reputation Power: 0
|
|
<---rookie (SQL Query Help)
Thanks in advance for taking the time to check this out...
I've recently became the administrator of a powerful SPC and data collection tool (infinityqs) at work. The application uses a Data Management Service that essentially allows us to communicate with other applications.
My task was to create a DMS Config. (provider) that would read the last saved database test value (TOP 1) for use with calculations.
I successfully created two DMS Configurations doing so and performed the necessary calculations. My delima is I now need to do this for ten other test values. I do not want to create DMS Config for each test value as it slows down the system and is inefficient.
Here is my SQL for one test value (working):
NOTE: The application I'm using gives me a "Startup" field and a "Processing" field
Startup:
SELECT TOP 1 F_SGRP FROM SGRP_TST WHERE F_TEST=1342169992 ORDER BY F_SGRP ASC
Processing:
SELECT TOP 1 F_SGRP, F_TEST, F_VAL FROM SGRP_TST WHERE F_TEST=1342169992 AND F_SGRP>%F_SGRP% ORDER BY F_SGRP DESC
I'm hoping there is a way to select multiple "F_VAL" variables from multiple "F_TEST" ID's ... possibly assign each of them to a variable name
I've done a lot of researching to no avail. Any help is greatly appreciated
Thanks a million,
Rob
|