Apologies in advance, I have minimal experience in the SQL realm. One of our systems delivers data in a format that places individual lines items from a single record into separate rows. An example:
Key Desc LineItem 55 AAA 1 55 BBB 2 66 CCC 1
I am looking to query this data in a way that would return the values for each Key as one line based on the line item number:
Key Desc1 Desc2 55 AAA BBB 66 CCC Null
Output.Desc1 = Input.Desc where Input.LineItem = 1
Output.Desc2 = Input.Desc where Input.LineItem = 2
Understanding how to return the desired output from my example should allow me to apply it to the larger data set. Thank you in advance for any assistance!