Viewing 3 posts - 1 through 3 (of 3 total)
as per your requirement following is the query of pivot but could not sum the quantity this is as per your requirement.
SELECT ItemCode AS 'Item Code',ItemName AS 'Item Name'
, U_SCE_IN_Industry...
August 7, 2014 at 5:48 am
try following query
drop table ttt
-----------------------
SELECT
T0.ItemCode
, T0.ItemName
, T0.U_SCE_IN_Industry
, T0.OnHand
, T0.StockValue
,sum(t1.quantity) dd
, 'Qty Sold ' + convert(varchar,datediff(year,(t2.docdate),getdate())) + ' Yr Ago' dsd
into ttt
FROM dbo.OITM T0
LEFT JOIN dbo.AU_SALES_R T1 ON...
August 7, 2014 at 5:34 am
Hi Vishal
FROM @ReturnOrderLines rol, SCHOrder.SellerOrders so
WHERE so.orderID = @OrderID AND so.[OrderLineNumber] = rol.OrderLineNumber
just check the query rol table contains only order line number. my query is
1....
August 7, 2014 at 1:40 am
Viewing 3 posts - 1 through 3 (of 3 total)