Cross tab query - DotNet and DataBase

Wednesday, 1 August 2018

Cross tab query



Crosstab query is used for reporting purpose. Using a crosstab query we can convert, row values into column names.
SELECT Yearc,Jan,FEB,MARCH,APRIL,May FROM tbl_Revenue

PIVOT
(
SUM(Revenue)
for Monthc in(Jan,FEB,MARCH,APRIL,May)
)
PIV

Result
Crosstab

No comments:

Post a Comment

x

Get Updates On

Discussion updates

Straight Into Your INBOX!

Enter your email address to subscribe to this website and receive notifications of new posts by email.