hi - I have Table1 like this. The PK is composite (ID, Order). There is a new (increased) ID every 7 rows. Order always runs 1 to 7 in increasing order.
I need to write a function ProcessData(n AS Integer) that will work with the 7 values of DataVal having the nth ID.
For example, ProcessData(2) would work with the 7 values of DataVal having the 2nd ID, namely 31. My function is already written except for this part... (WHERE ID = nth Distinct value of ID). any clues as to how to write this clause? I'd also need to know if there are no ID values left.
thanks in advance!
Code:
T_Input Id Order DataVal
23 1 354
23 2 327
23 3 325
23 4 297
23 5 211
23 6 114
23 7 26
31 1 234
31 2 214
31 3 199
31 4 183
31 5 155
31 6 52
31 7 9
37 1 474
37 2 311
et cetera..
I need to write a function ProcessData(n AS Integer) that will work with the 7 values of DataVal having the nth ID.
For example, ProcessData(2) would work with the 7 values of DataVal having the 2nd ID, namely 31. My function is already written except for this part... (WHERE ID = nth Distinct value of ID). any clues as to how to write this clause? I'd also need to know if there are no ID values left.
thanks in advance!