I have searched extensively for this type of resolution but have not been able to find anything that works.
Here is my data:
Table1
co_num | item id
L11400 | widget1
L11400 | widget2
L11400 | widget3
L11401 | widget1
L11401 | widget2
I would like to query the table and return the data like this:
co_num | itemid1 | itemid2 | itemid3
L11400 | widget1 | widget2 | widget3
L11401 | widget1 | widget2 | (blank)
Is this possible? I'm using SQL 2008. It does need to be dynamic because the number of items may vary. It would be best if this could possibly be down in a view/query.
Thanks