First, I'm not a database person, but I am trying to get database logging turned on in order to mine test data anyways. Instructed to use Microsoft SQL. TestStand (2016) sequence is working fine. When enabling database logging, the default schema order in Teststand resulted in errors when the sequence tried to write to the database. Not really knowing why, played around with reordering the schema:
UUT Result
Step Result
Step SEQCALL
STEP NUMERICLIMIT1
STEP NUMERICLIMIT2
PROP RESULT
PROP_MULTINUMERICLIMIT1
PROP_MULTINUMERICLIMIT2
....
It was only after moving up PROP_RESULT between numericlimit and multinumericlimit did teststand stop reporting an error when writing to the database. On another test application, encountered similar issues, and had to also swap numericlimit1 and numericlimit2, so 2 was above 1. I have no idea of the ramifications of what this does.
I then use TestStand to create the SQL file, which looks to be good, no error reporting by TS. When I run the SQL file in the database viewer, it creates errors.
"-- 1. Multiple instances of 'CREATE PROCEDURE' SQL commands are present for the procedure 'InsertNumericLimit'. Please retain only one valid instance of the command and remove the others.
-- 2. Multiple instances of 'CREATE PROCEDURE' SQL commands are present for the procedure 'InsertPropResult'. Please retain only one valid instance of the command and remove the others."
Those duplicate procedures are identical, except they are inserting the results to two different locations.
GO |
CREATE PROCEDURE InsertNumericLimit |
@pID uniqueidentifier, |
@pPROP_RESULT uniqueidentifier, |
@pCOMP_OPERATOR varchar(32), |
@pTHRESHOLD_TYPE varchar(32), |
@pNOMINAL_VALUE float, |
@pUPPER_THRESHOLD float, |
@pLOWER_THRESHOLD float, |
@pHIGH_LIMIT float, |
@pLOW_LIMIT float, |
@pUNITS varchar(255), |
@pSTATUS varchar(255) |
AS |
INSERT INTO STEP_NUMERICLIMIT2 ( ID,PROP_RESULT,COMP_OPERATOR,THRESHOLD_TYPE,NOMINAL_VALUE,UPPER_THRESHOLD,LOWER_THRESHOLD,HIGH_LIMIT,LOW_LIMIT,UNITS,STATUS) |
VALUES ( |
@pID, |
@pPROP_RESULT, |
@pCOMP_OPERATOR, |
@pTHRESHOLD_TYPE, |
@pNOMINAL_VALUE, |
@pUPPER_THRESHOLD, |
@pLOWER_THRESHOLD, |
@pHIGH_LIMIT, |
@pLOW_LIMIT, |
@pUNITS, |
@pSTATUS) |
One inserts to:
INSERT INTO STEP_NUMERICLIMIT2 ( ID,PROP_RESULT,COMP_OPERATOR,THRESHOLD_TYPE,NOMINAL_VALUE,UPPER_THRESHOLD,LOWER_THRESHOLD,HIGH_LIMIT,LOW_LIMIT,UNITS,STATUS)
and the other identical procedure inserts to:
INSERT INTO PROP_MULTINUMERICLIMIT2 ( ID,PROP_RESULT,COMP_OPERATOR,THRESHOLD_TYPE,NOMINAL_VALUE,UPPER_THRESHOLD,LOWER_THRESHOLD,HIGH_LIMIT,LOW_LIMIT,UNITS,STATUS)
When I used my very limited database skills to try and join the tables to make some sense of the various tables, my JOIN attempts kept coming up blank. I looked at the contents of the tables and I can see that I have valid ID's that link between UUT_RESULT and STEP_RESULT tables, but anything below that can't be linked. When I looked at the other sub tables, I can't find an ID to link back to STEP_RESULTS, and some of the tables are completely blank.
Any idea on what I'm doing wrong or how to resolve? Thanks in advance.