Dynamic column based on row
-
Hi All, I have two tables (sql server) MainTable --------- Emp_code BasicPay TotalAddition ------- -------- -------------- 160 3000 200 161 4000 100 Additions Table -------- trx_amount desc emp_code ---------- ---- -------- 100 Bonus 160 100 Transport 160 20 Bonus 161 30 Transport 161 50 Food 161 My output grid should be like this Emp_code Basicpay Bonus transport Food TotalAddition(total of additions) -------- --------- ------ --------- ------ ------------- 160 3000 100 100 0 200 161 4000 20 30 50 100 Please suggest with this
Ramkumar ("When you build bridges you can keep crossing them. ") http://ramkumarishere.blogspot.com
-
Hi All, I have two tables (sql server) MainTable --------- Emp_code BasicPay TotalAddition ------- -------- -------------- 160 3000 200 161 4000 100 Additions Table -------- trx_amount desc emp_code ---------- ---- -------- 100 Bonus 160 100 Transport 160 20 Bonus 161 30 Transport 161 50 Food 161 My output grid should be like this Emp_code Basicpay Bonus transport Food TotalAddition(total of additions) -------- --------- ------ --------- ------ ------------- 160 3000 100 100 0 200 161 4000 20 30 50 100 Please suggest with this
Ramkumar ("When you build bridges you can keep crossing them. ") http://ramkumarishere.blogspot.com