Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamic Pivot for multiple columns in SQL Server 2000
    primarykey
    data
    text
    <p>I know, it is bad etiquette to post the same question link in other forum, but here it is my question link :</p> <p><a href="http://www.sqlservercentral.com/Forums/Topic1474579-8-1.aspx" rel="nofollow">http://www.sqlservercentral.com/Forums/Topic1474579-8-1.aspx</a></p> <p>Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)</p> <p>Table structure and sample insert statements :</p> <pre><code>create table consumption ( code varchar(6), prodname varchar(50), department varchar(20), netqty decimal(10,2), netmrp decimal(10,2) ) insert into consumption values ('U00180','USG JELLY IM-K','SONO',11.4,130.40) insert into consumption values ('U00280','UNIDINE 1 LITRE SOLUTION','AKD',1.4,10.40) insert into consumption values ('V02401','VOLINI GEL 50GM','PHYSIOTHERAPY',8,15) insert into consumption values ('V02402','X RAY FILM DIGITAL 14"X 17"','MRI',3,26.40) insert into consumption values ('U00380','TROPAC P DROPS ','AKD',21.46,56.78) insert into consumption values ('U00380','TROPAC P DROPS ','AKD',10,10) </code></pre> <p>Table Data :</p> <pre><code>code prodname department netqty netmrp U00180 USG JELLY IM-K SONO 11.40 130.40 U00280 UNIDINE 1 LITRE SOLUTION AKD 1.40 10.40 V02401 VOLINI GEL 50GM PHYSIOTHERAPY 8.00 15.00 V02402 X RAY FILM DIGITAL 14"X 17" MRI 3.00 26.40 U00380 TROPAC P DROPS AKD 21.46 56.78 U00380 TROPAC P DROPS AKD 10.00 10.00 </code></pre> <p>Required Output please :</p> <pre><code>CODE PRODNAME AKD MRI PHYSIOTHERAPY SONO NET QTY NET MRP NET QTY NET MRP NET QTY NET MRP NET QTY NET MRP U00180 USG JELLY IM-K 11.40 130.40 U00280 UNIDINE 1 LITRE SOLUTION 1.40 10.40 U00380 TROPAC P DROPS 31.46 66.78 V02401 VOLINI GEL 50GM 8.00 15.00 V02402 X RAY FILM DIGITAL 14"X 17" 3.00 26.40 </code></pre> <p>I am sorry, to post the question in such a way, but if anyone can please help me by looking the above link, I shall be thankful for your help.</p> <p>Just because I think in that forum, there is less activity, so I am trying here.</p> <p>Update:Question is solved and I posted the solution in the same above link. Thanks to all who participated and helped me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload