emi_sastra
asked on
Arrange rows to colums
Hi All,
I have below data :
I want to convert it into :
1 54 AUDI
55 108 AUDI
109 126 ALFA ROMEO
127 180 BMW
181 181 BMW
How could I do it ?
Thank you.
I have below data :
1 AUDI
55 AUDI
109 ALFA ROMEO
127 BMW
181 BMW
I want to convert it into :
1 54 AUDI
55 108 AUDI
109 126 ALFA ROMEO
127 180 BMW
181 181 BMW
How could I do it ?
Thank you.
ASKER
Hi Timothy,
I use sql 2008.
Please provide solution.
Thank you.
I use sql 2008.
Please provide solution.
Thank you.
What you need is a running total with a bit of twist (minus 1)
ASKER
Hi John,
Still don't get the idea ?
Thank you.
Still don't get the idea ?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all.
https://www.databasejournal.com/features/mssql/converting-rows-to-columns-pivot-and-columns-to-rows-unpivot-in-sql-server.html