SELECT supplierOrderDetails.productID as productid, supplierOrder.id as supplierorderid, product.brandname as brandname, product.productcode as code, supplierOrderDetails.orderQty as orderQty, supplierOrderDetails.id as sodID, SUM(supplierOrderReceiveDetail.qtyArrived) as qtyArrived , supplierOrderReceiveDetail.batchNo as BatchNo FROM supplierOrder LEFT OUTER JOIN supplierOrderDetails ON ( supplierOrderDetails.supplierOrderID = supplierOrder.ID ) LEFT OUTER JOIN product ON ( product.id = supplierOrderDetails.productID ) LEFT OUTER JOIN supplierOrderReceive ON ( supplierOrderReceive.supplierOrderID = supplierOrder.ID ) LEFT OUTER JOIN supplierOrderReceiveDetail ON ( supplierOrderReceiveDetail.supplierOrderReceiveID = supplierOrderReceive.ID ) AND ( supplierOrderReceiveDetail.ProductID =supplierOrderDetails.ProductID ) WHERE supplierOrder.ID = 1 and supplierOrderDetails.isComplete = 1 GROUP BY supplierOrderDetails.productID, supplierOrderDetails.orderQty, product.brandname, product.productcode, supplierOrder.id, supplierOrderDetails.id, supplierOrderReceiveDetail.batchNo
|Azure SQL Insert not working suddenly||11||22|
|Is there a way using SQL Server 2008 to display a varchar(10) value as Month Name followed by year [08/03/2017 -> August 2017] if the value is stored in format MM/DD/YYYY ?||1||13|
|SQL Select - How to checks a column that contains numerics in first 3 positions||7||18|
|Need SQL that flips value||5||19|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
24 Experts available now in Live!