troubleshooting Question

Help with SQL Query

Avatar of Philippe Renaud
Philippe RenaudFlag for Canada asked on
Microsoft SQL ServerSQL
14 Comments1 Solution40 ViewsLast Modified:
Hello EE, I need help to transform an existing table results that I did, to change a bit the way results are, in another format.

See picture below for the columns.

You see around the middle, I have 3 columns  OH_WH, PK_WH, WIP_WH.
then after I have the QTY for each of them OH..PK..WIP.

I would need that, instead having 3 columns for OH_WH, PK_WH, WIP_WH., to only have 1 called : "WH" and only keep the 3 QTY columns.

so that results of WH would be vertically instead of horizontally.
in other words, if a row was:   06, 35, 35  and QTY were  1, 39, 36

the results would be :

06      1     0      0
35      0     39   36

do you follow what I mean ?


forEE.jpg
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 14 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros