Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Pivot Report

$
0
0

I am having a hard time wraping my head around the PIVOT command and I hope someone can help me.

I have a table with DBName, Size, RptDate that looks like this but with a lot more data and 2 years worth of dates...

DB13.1 1/1/2013
DB22.0 1/1/2013
DB1 3.5 2/1/2013
DB2 2.4 2/1/2013
DB1 3.9 3/1/2013
DB2 2.6 3/1/2013

What I would like to see is this...

DBName1/1/20132/1/20133/1/2013
DB13.1 3.53.9
DB22.0 2.42.6

This should be possible using PIVOT, correct?  Any help would be great.  Thank you.



Viewing all articles
Browse latest Browse all 23857

Trending Articles



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