I have a following student table in SQL:
ID | Name | Jan | Feb | Mar | Apr
---------------------------------------------------------
1 | Ram | Paid | Paid | Unpaid | Unpaid
2 | Hari | Paid | Unpaid| Unpaid | Unpaid
I have a table that has id and name in my JTable
ID | Name
---------------
1 | Ram
2 | Hari
When I click on the first row I want to get another table showing payments:
Month | Status
----------------
Jan | Paid
Feb | Paid
Mar | Unpaid
Apr | Unpaid
These payments details should come from same SQL table (the first) one.... How do I get the Payment table transposing the part of SQL table?