I have a query that It gives the following output:
State CST QTY
aa 0 10
aa 1 20
aa 2 30
aa 3 40
ac 0 10
ac 1 20
ac 2 30
ac 3 40
I am using in spring mvc with jdbc template: While Implementing RowMapper I am getting confused which data Structure need to use and how to map the each row to get the following output following EXPECTED O/P:
STATE CST0 CST CST2 CST3
aa 10 20 30 40
ac 10 20 30 40
Can any one help me?
RowMapper... But why make it more complex as needed, the database is very capable of doing that and is probably more efficient that transferring a lot of data to your java application and transform it with your application. - M. Deinum