11-28-2025 02:37 AM
Anyone has an example of a SQL query for getting e.g a string value from an an additional result in the standard NI TestStand database.
11-28-2025 03:02 AM
If you are using the AdditionalResults Step Properties or the AdditionalResults Steps, the DataBase Reporting automatically puts this data into the DB.
12-01-2025 08:56 AM
Hi
I which to retrieve the data already in the database via sql.
br
Nikolaj
12-01-2025 11:53 PM
Sorry, I have misread your original question...
When creating that query, my guess is, that you need to consider the actual schema used for data base logging and hopefully. they have used the steps UID to reference the stuff within the tables...
12-03-2025 04:52 PM
It's been a long time since I messed with this, but some research is starting to bring it back. Based on here:
https://www.ni.com/docs/en-US/bundle/teststand/page/default-teststand-table-schemas.html
I think additional results (under step properties) are linked as children in PROP_RESULT under the same STEP_RESULT. Something like:
SELECT *
FROM
UUT_RESULT AS UR
INNER JOIN STEP_RESULT AS SR ON SR.UUT_RESULT = UR.ID
LEFT JOIN PROP_RESULT AS PR ON PR.STEP_RESULT = SR.ID
LEFT JOIN PROP_RESULT AS PR_child ON PR_child.PROP_PARENT = PR.ID
WHERE
UR.UUT_SERIAL_NUMBER = '123123'
The join from UUT_RESULT to STEP_RESULT to PROP_RESULT is the default set for the normal TestStand schema. Then you can access the child of each additional result via a join with PROP_PARENT.
It's also possible that each additional result generates its own line in PROP_RESULT, in which case you can ignore the final self-join that retrieves the child data.
Then more filtering from there as you want to narrow down which results are pulled.
I don't have a database on-hand to test this unfortunately, so some of this is an educated guess, but hopefully this gets you started in the right direction!