Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Create and manipulate pivot table based on query result in SQL Server .......

$
0
0

I got below result based on some query manipulation .....


CompanyNameAgentBranchTotalAmtCommision
-----------------------------------------------------------------
123A00000173B0001250000.00-400.00
123A00000355B000162613.00 -600.00
1111 pc 001 8475941.0011.00
1111 pc 001312480.003124.80
-------------------------------------------------------------------------------------------------------------------
My problem is that I want to get this query result in below form ......
AgentBranch1231111TotalCommision (summation)
--------------------------------------------------
A00000173 B0001 250000.00 -400.00
A00000355 B0001 62613.00 -600.00
1111pc8475941.00 312480.003135.80

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>