Skip to Content
0
Former Member
Nov 15, 2010 at 01:31 PM

add wh

21 Views

hi,

i jus want to add ware house in the follwing query. pls help me... when i add wh its showing error.

SELECT T0.docdate as ' As On',

T0.ItemCode as 'Item Code',

t2.Itemname as 'Item Name',

t3.itmsgrpnam as 'Item Group',

t4.cardname as 'Supplier Name',

t5.groupname as 'Group Code',

SUM(T0.InQty-T0.OutQty) AS 'Inventory Qty',

sum(t0.transvalue) as 'Inventory Value'

FROM dbo.OINM T0

inner join oitm t2 on t2.itemcode = t0.itemcode

left outer JOIN OITB T3 ON t3.ItmsGrpCod = T2.ItmsGrpCod

left outer join ocrd t4 on t4.CardCode = t2.cardcode

left outer join ocrg t5 on t5.GroupCode = t4.groupcode

WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]'

GROUP BY T0.ItemCode,t3.itmsgrpnam,t2.Itemname,t4.cardname,t5.groupname,T0.docdate

regards,

Vignesh.R