I have a query with multiple joins that is giving me trouble when trying to group the output in cf. I cannot group the result set correctly. A test can have multiple test engineers and mutliple components involved and the components can have multiple operators. In the example recordset below, all of the fields consist of primary key values obtained from joins... I think my query is ok... I just need help grouping the results into an html table. So below, I've gotten all of the test engineers, components and operators involved in test number 1:
Query order by clause:
Order by testnum, testengineernum, testcomponentnum, testoperatornum
testnum testengineernum testcomponentnum testoperatornum
1 25 50 190
1 25 50 191
1 25 51 177
1 50 50 190
1 50 50 191
1 50 51 177
2 15 50 65
2 15 60 75
2 30 50 65
2 30 60 75
As you can see the components and operators are repeated for each test engineer in order to get all possibilities of everything involved in this test.
So I need to loop through each specified testnum (specified in multiselect control) and get all occurrences of test engineers, components, and operators involved in that test. The problem is the records are repeating (specifically on testcomponentnum), even when I nest cfoutput groups. Any idea how I can get the results to display like this below?
testnum: 1
testengineers:25, 50
testcomponents-testoperators:
50- 190, 191
51- 177
testnum: 2
testengineers:15, 30
testcomponents-testoperators:
50- 65
60- 75
This is how my code is displaying them, it's repeating on testcomponentnum, eveything's fine other than that:
testnum: 1
testengineers:25, 50
testcomponents-testoperators:
50- 190, 191
51- 177
50- 190, 191
51- 177
There's gotta be something easy I'm missing... surely this can be done. Can someone please help? I can attach my code if needed. Thanks!!!
Query order by clause:
Order by testnum, testengineernum, testcomponentnum, testoperatornum
testnum testengineernum testcomponentnum testoperatornum
1 25 50 190
1 25 50 191
1 25 51 177
1 50 50 190
1 50 50 191
1 50 51 177
2 15 50 65
2 15 60 75
2 30 50 65
2 30 60 75
As you can see the components and operators are repeated for each test engineer in order to get all possibilities of everything involved in this test.
So I need to loop through each specified testnum (specified in multiselect control) and get all occurrences of test engineers, components, and operators involved in that test. The problem is the records are repeating (specifically on testcomponentnum), even when I nest cfoutput groups. Any idea how I can get the results to display like this below?
testnum: 1
testengineers:25, 50
testcomponents-testoperators:
50- 190, 191
51- 177
testnum: 2
testengineers:15, 30
testcomponents-testoperators:
50- 65
60- 75
This is how my code is displaying them, it's repeating on testcomponentnum, eveything's fine other than that:
testnum: 1
testengineers:25, 50
testcomponents-testoperators:
50- 190, 191
51- 177
50- 190, 191
51- 177
There's gotta be something easy I'm missing... surely this can be done. Can someone please help? I can attach my code if needed. Thanks!!!