Home Forums SQL Server 2005 SQL Server 2005 General Discussion How to join multiple tables (SQL) to find the difference between an order and shipped quantities? RE: How to join multiple tables (SQL) to find the difference between an order and shipped quantities?

  • ORDER

    IDOrderRef1OrderDateShippedReceiptSent

    1525118111515912/01/201300

    1524118111515810/01/201300

    orderITEMS

    IDOutboundDeliveryIDOrderLineNrItemNumberBatchNrQtyToShip

    16631525901715655552Y637N20

    1662152420122000600NULL1

    shipping

    idclientpodate

    1776204000080014959 2013-07-11 00:00:00.000

    1776184000080014957 2013-07-11 00:00:00.000

    shippingArchive

    IDOrigIDClientProductCodeLotIDLotQtyStatusIDStatusDate

    4262720040071034600283835613EM1064311776182013-07-11 00:00:00.000

    4262722040071034600283835613EM1064311776202013-07-11 00:00:00.000