
Display values from vertical line to horizontal line

2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Jul 11, 2023, 6:02 AM EDT
Check this:
SELECT customer_id, collector, mc_code, customer_name, industry, isegment, segment FROM yourTableName UNPIVOT ( segment FOR segmentname IN (segment2, segment3, segment4, segment5, segment6, segment7, segment8) ) AS unpivoted_data;yesubabu kRank #2,091 · 687 reputationPosted Jul 11, 2023, 1:04 AM EDT
please help to get above format , i am lack of knowledge on that please help any one sir