Skip to content
Advertisement

split one column values into multiple column based another column value

could you please help me writing select query to get expected output from the below picture. what I want is to split the UPC column values into three columns(Bottle UPC, Pack UPC, Case UPC) based on its UOM column values ZF2, ZF1 and ZF3 respectively.

any help would be appreciated. Thank you!

enter image description here

Advertisement

Answer

This is one way to get the exact result you want, but it is confusing why you’d want all three rows to be returned with values you’ve already transposed to the first row only…

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement