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.PartNum,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