cross tab query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karunajo
    New Member
    • May 2007
    • 37

    #1

    cross tab query

    hi,

    I want to calculate the quantity by partid against month using Cross tab query..
    plz tel me how to write it..

    I did select the pari id by using the following query

    select distinct d.PartID from (select a.I_itemnum,b.P artNum,c.PartID from dbo.Receipt a left join dbo.Despatch b on b.InwardNum = a.I_itemnum left join dbo.Part c on c.PartNum =b.PartNum where a. CV_Num=1)d

    and select the date using


    SELECT DATENAME(month, convert(varchAR (30),DespatchDt ,101)) as "Month Name" from despatch
    WHERE DespatchDt between '06/10/2006' and '06/21/2007'


    the quantity is in despath table in which i took partid s there.


    how can i calculate Quantity using cross tab query
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Perhaps if you showed us the structure of your database tables we would be able to give you an answer. Also, could you specify what database you are using?

    Comment

    Working...