|
BigMeat
Yak Posting Veteran
56 Posts |
Posted - 11/11/2012 : 13:20:38
|
Hi
I have a SQL 2012 DB and have a select statement that returns 30 rows of info. eg row contains years values from year 2000 to 2020. In some cases the we may not have data form year 2000 so I want my TSQL to only return columns that have values, eg do not return year 2000 all values are null
I came across this method http://stackoverflow.com/questions/11227288/remove-null-columns-from-pivot-tsql
But i wanted to see if there was another way of doing this
many thanks in advance |
|