I have Hardcoded The Query. I understood it is quite a huge task to dynamically select the columns which are not nulls. I am asking because Col4 for example have values in other rows than first and second, so I think it might appear in output, or if not what is the logic?
I was pondering on the issue but i can find quite a few work around to achieve what you want, as i understand you want a dataset over multiple 'servers'. All dirty as hell, and i would rather suggest you change the table-layout to reflect a database design. Your request is strange It is impossible to solve by simple T-SQL , especially if the data have changed frequently Blog : Large scale of database and cleansing.
A possible solution is to first unpivot the data to a dataset with three column: server column value. After that you can filter out the null valued rows with a conditional split. Discover why our customers rate Chartio 1.
Sign up for a day free trial. No credit card required. Share this: Tweet. Like this: Like Loading Published by Ashutosh Sharma. Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:. Email required Address never made public. Sign in Email. Forgot your password? Ask a Question.
Please Sign up or sign in to vote. See more: SQL. Hi, I have a table called "test" which has columns like app1,app2,app3,app4,app I want to select only those columns which value not null. Posted Jun pm Merajuddin Ansari. Add a Solution. CPallini Jun am. I would re-design the database. Suvendu Shekhar Giri Jun am. Check this link. May be it can give you the idea. Find all those columns which have only null values, in a MySQL table.
0コメント