enter image description here – Image1
Recently I came across 1 requirement where in the table structure is in above format. But actually we need data in transpose format – rows to column.
- Applying 2 for nested loops and then populating data in the above format – Image2
enter image description here
I’ve come up with following solutions/approaches
solution 1. Applying nested for loops and then and based on case statements update the table2.
solution 2. Using cursor and then applying the data in the required format.
Although, there could be better ways to get the solution. So, I am looking for best and optimized solution to get the data in transpose format.
Please someone suggest me better approach/solution for the same.
Thanks in advance.
I am still working with the solution 1 and solution 2
Ashutosh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.