Input:
col1 Col2 Col3
---- ------ -----
R1 Rajesh R1
R2 Rohan R2
R3 venkat R3
R4 Total R1
R4 Total R2
R4 Total R3
Output:
Col1 Col2 Col3 Col4
---- ---- ----- ----
R1 Rajesh R1 Rajesh
R2 Rohan R2 Rohan
R3 venkat R3 Venkat
R4 Total R1 Rajesh
R4 Total R2 Rohan
R4 Total R3 Venkat
I need dynamic sql query for above expected result.Please help.
SQL Query Problem statement
New contributor
sohan mp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1