I have similar to this table with many columns and thousand of rows (patients)
- as you can see each patient have 6 tests(test1 to test6) with different 6 result.
- all other columns have the same result.
- I need to switch the results from vertical to horizontal so I the table can show one record for each patient. like table2
Table 1:
Before:
[TABLE="width: 542"]
<tbody>[TR]
[TD="width: 62, bgcolor: white"]FILE NO
[/TD]
[TD="width: 86, bgcolor: white"]RCVD DATE
[/TD]
[TD="width: 76, bgcolor: white"]COUNTRY
[/TD]
[TD="width: 87, bgcolor: white"]ID_NO
[/TD]
[TD="width: 80, bgcolor: white"]PID_NO
[/TD]
[TD="width: 121, bgcolor: white"]TEST
[/TD]
[TD="width: 104, bgcolor: white"]RESULT
[/TD]
[TD="width: 105, bgcolor: white"]REPORT DATE
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST1
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST2
[/TD]
[TD="bgcolor: white"]NOT TESED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST3
[/TD]
[TD="bgcolor: white"]POSITIVE
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]FINAL RESULT
[/TD]
[TD="bgcolor: white"]POSTTIVE
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST4
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST5
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST6
[/TD]
[TD="bgcolor: white"]PENDING
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
After:
[TABLE="width: 928"]
<tbody>[TR]
[TD="width: 62, bgcolor: white"]FILE NO
[/TD]
[TD="width: 86, bgcolor: white"]RCVD DATE
[/TD]
[TD="width: 76, bgcolor: white"]COUNTRY
[/TD]
[TD="width: 87, bgcolor: white"]ID_NO
[/TD]
[TD="width: 80, bgcolor: white"]PID_NO
[/TD]
[TD="width: 121, bgcolor: white"]TEST1
[/TD]
[TD="width: 104, bgcolor: white"]TEST2
[/TD]
[TD="width: 105, bgcolor: white"]TEST3
[/TD]
[TD="width: 104, bgcolor: white"]TEST4
[/TD]
[TD="width: 104, bgcolor: white"]TEST5
[/TD]
[TD="width: 81, bgcolor: white"]TEST6
[/TD]
[TD="width: 120, bgcolor: white"]FINAL RESULT
[/TD]
[TD="width: 105, bgcolor: white"]REPORT DATE
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]POSITIVE
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]PENDING
[/TD]
[TD="bgcolor: white"]POSITIVE
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
</tbody>[/TABLE]
- as you can see each patient have 6 tests(test1 to test6) with different 6 result.
- all other columns have the same result.
- I need to switch the results from vertical to horizontal so I the table can show one record for each patient. like table2
Table 1:
Before:
[TABLE="width: 542"]
<tbody>[TR]
[TD="width: 62, bgcolor: white"]FILE NO
[/TD]
[TD="width: 86, bgcolor: white"]RCVD DATE
[/TD]
[TD="width: 76, bgcolor: white"]COUNTRY
[/TD]
[TD="width: 87, bgcolor: white"]ID_NO
[/TD]
[TD="width: 80, bgcolor: white"]PID_NO
[/TD]
[TD="width: 121, bgcolor: white"]TEST
[/TD]
[TD="width: 104, bgcolor: white"]RESULT
[/TD]
[TD="width: 105, bgcolor: white"]REPORT DATE
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST1
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST2
[/TD]
[TD="bgcolor: white"]NOT TESED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST3
[/TD]
[TD="bgcolor: white"]POSITIVE
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]FINAL RESULT
[/TD]
[TD="bgcolor: white"]POSTTIVE
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST4
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST5
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]TEST6
[/TD]
[TD="bgcolor: white"]PENDING
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
After:
[TABLE="width: 928"]
<tbody>[TR]
[TD="width: 62, bgcolor: white"]FILE NO
[/TD]
[TD="width: 86, bgcolor: white"]RCVD DATE
[/TD]
[TD="width: 76, bgcolor: white"]COUNTRY
[/TD]
[TD="width: 87, bgcolor: white"]ID_NO
[/TD]
[TD="width: 80, bgcolor: white"]PID_NO
[/TD]
[TD="width: 121, bgcolor: white"]TEST1
[/TD]
[TD="width: 104, bgcolor: white"]TEST2
[/TD]
[TD="width: 105, bgcolor: white"]TEST3
[/TD]
[TD="width: 104, bgcolor: white"]TEST4
[/TD]
[TD="width: 104, bgcolor: white"]TEST5
[/TD]
[TD="width: 81, bgcolor: white"]TEST6
[/TD]
[TD="width: 120, bgcolor: white"]FINAL RESULT
[/TD]
[TD="width: 105, bgcolor: white"]REPORT DATE
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]1
[/TD]
[TD="bgcolor: white"]5/1/2018
[/TD]
[TD="bgcolor: white"]USA
[/TD]
[TD="bgcolor: white"]1234567890
[/TD]
[TD="bgcolor: white"]ABCDEFGH
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]POSITIVE
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]NOT TESTED
[/TD]
[TD="bgcolor: white"]PENDING
[/TD]
[TD="bgcolor: white"]POSITIVE
[/TD]
[TD="bgcolor: white"]5/25/2018
[/TD]
[/TR]
</tbody>[/TABLE]