Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
BigMeat
Yak Posting Veteran
56 Posts |
Posted - 2012-11-11 : 13:20:38
|
HiI 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 nullI 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 thismany thanks in advance |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-11-11 : 20:01:49
|
Dynamic SQL is the only way KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|