Skip to content
Advertisement

Covert a duplicate Row value into column using pivot table

Here is my stored procedure query to fetch data in first table.

I have following Data in a temp table.

I want Name 1, Name 2, Name 3 as column and their value against the respective item.Data in table is dynamic.There can be any number of Items and any number of Name. For every Name and Item their is a value which can be a single digit number. Items are same for every Name Thanks

I need something like below.

Advertisement

Answer

This Worked well for me. 🙂

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