Forum Discussion
Vertical results from multiple columns
Binarak , I can't see anything in that screenshot in micro-format, but I guess you are looking for the UNPIVOT command, see
Using PIVOT and UNPIVOT - SQL Server | Microsoft Docs
For a more detailed answer please post table design as DDL, some sample data as DML statement and the expected result.
Olaf
- BinarakAug 26, 2022Copper Contributor
Hello good sir. Thank you so much for taking time to respond. I thought that the screenshot might be too small. I wasn't sure how to give a clear view. Ill give you a better picture.
Thank you so much.
- Ronen_ArielyAug 27, 2022MVP
Hi Binarak
First, welcome to the family of SQL Server users
Even if the image is big and we can read the content, it is still an image and not queries - text which we can copy->test->fix...
What do you think will be simpler and faster. Option one: each one of the 100 people that come to the forum to help others instead of helping 10 people, will spend all his time to manually check the image -> type the query. Or maybe option two: one person who asked the question and has all the information will simply provide the query instead images?!?
Please provide:
1) Queries to CREATE your table(s)
2) Queries to INSERT sample data.
3) The desired result given the sample.
4) A short description of the business rules.
5) Which version of SQL Server you are using.- BinarakAug 28, 2022Copper Contributor
I apologize. I am very new to in depth SQL. I am a virtualization and Azure admin. Just trying to help with something I don't know. I know the difference between an image and text.
I was just not sure how to post it in a presentable way, because when I copy and pasted, it looked like a disaster. I was probably over concerned about the look of my post. Is there a specific way to format the query or I just cope as plain text?