July 20th, 2012, 02:36 PM
<---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
SELECT TOP 1 F_SGRP FROM SGRP_TST WHERE F_TEST=1342169992 ORDER BY F_SGRP ASC
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,