0 Replies Latest reply: Jan 15, 2018 11:28 AM by Sandeep sharma RSS

    How to get balance quantity ??

    Sandeep sharma

      Hi Guys,

      I have two tables.

       

      TABLE1

        

      PRIORITYCODEQNTY
      1A10
      1B22
      2A5
      2B20
      2C10

       

      TABLE 2

       

       

      CODE TOTAL QNTY
      A25
      B45
      C55

       

      from above two tables I required below result.

       

         

      PRIORITYCODEQNTYAVL QNTY
      1A1025-10 =10(TOTAL AVL QUNTY IS 25)
      1B2245-22=23(TOTAL AVL QUNTY IS 45)
      2A510-5(TOTAL AVL QUNTY IS 10, AS 10 ALREADY USED IN #1)
      2B2023-20=3(TOTAL AVL QUNTY IS 22, AS 22 ALREADY USED IN #2)
      2C1055-10(TOTAL AVL QUNTY IS 55)

       

      Please help..

       

      Thanks

      Sandeep