Forum Replies Created

Viewing post 1 (of 1 total)

  • Reply To: Pivot Query

    Below query will give you the desired output.

    SELECT

    PVT.[imtPartID],

    PVT.[1] AS Receipt,

    PVT.[2] AS Issue,

    PVT.[3] AS Adjustment

    FROM

    (

    SELECT

    [imtPartID],

    imtTransactionType

    FROM #PartTransactions

    ) AS Z

    PIVOT (COUNT(imtTransactionType) FOR imtTransactionType IN ([1],[2],[3]))AS PVT

     

     

    Attachments:
    You must be logged in to view attached files.

Viewing post 1 (of 1 total)