>>Message imported from previous forum - Category:Scripts and Tips<<
User: hemanth, originally posted: 2019-10-08 11:28:11 Id:534
I have created a data table [TEST1_TABLE] in clearscada with Index1,val1,val2 all INT type.
Inserted few rows using INSERT command.
Is it possible to extract number of rows to an internal variable in ST to perform some calculation! I have been trying the following code to extract rows from DataTable but not successful in transferring to internal variables [ Rec_count,val1,val2]
IS TEHRE A WAY TO GET ROWS?
Test1 AT %S(Select Index1,val1,val2 FROM TEST1_TABLE WHERE Index1 = 2):RESULTSET OF RECORDS;
IF Test1.Valid = TRUE THEN
Rec_count := pump1data.Index1;
val1 := pump1data.val1;
val2 := pump1data.val2;
Solved! Go to Solution.
>>Responses imported from previous forum
Reply From User: geoffpatton, posted: 2019-10-08 20:41:59
I think it is Test1.Size is the number of rows
Reply From User: hemanth, posted: 2019-10-10 03:54:32
following link provides more info...