sql - Pivot table display -
Hi,
As the data shown below,
Maddod Attr1 Attr1 Innstock ITM -000001 43S1 ITM -000001 52L2 ITM -000006 42 R1 ITM -000006 44 R2 ITM -000009 56 R1 ITM-200 0011 40R2
and pivot table (or using any other technique) I want to reslut like
I suggest you write the following Use a reporting tool to finalize your query, and the output to go to the layout, as you've shown. Most of the reporting tools should be very difficult to drag the Item code column into a section title.
42 43 44 52 56 items -000001 S1 ITM-2000001 L2 ITM-20000006 R1 2 ITM -000009 R1
To create the above layouts The query for is as follows:
Select ItemCode, Attr2, SUM (in case Attr1 = 42 then the INSTOCK ELSE 0 end) S 42, SUM (case when Attr1 = 43 THEN INSTOCK ELSE 0 END) as S43, SM (in case Attr1 = 44 THEN INSTOCK ELSE 0 END) S44, SUM (in case Attr1 = 52 then INSTOK ELSE 0 END) S 52, SUM (in case Attr1 = 56 THEN InStock ELSE 0 END) stockdata group from SR 56 ItemCode, Attr2
Edit
As the SERS has insufficient stability, Attr1 and Attr2 value those columns to a standard axis, then SQL The best tool to solve the problem is not.
You get better FF returns data in a customer's application, and it allows you to process the information for you. You can easily add arbitrary columns to your results before getting the final result.
Comments
Post a Comment