www.webdeveloper.com
Results 1 to 1 of 1

Thread: Need Help in getting only data which can suffix the total Qty

  1. #1
    Join Date
    Oct 2011
    Posts
    350

    Need Help in getting only data which can suffix the total Qty

    Hi...

    I have a
    table: bom
    fields:
    Comp = P28
    ReqQty = 31968

    and I have table
    table: dipping
    fields needed to get data
    LOT_CODE
    OUTPUT_QTY
    DATE_ENTRY

    now I only want to get LOT_CODE and OUTPUT_QTY where can suffix the ReqQty ORDER BY DATE_ENTRY

    I tried this query:

    Code:
    SELECT SUBSTR(LOT_CODE, 9,4) AS Comp, LOT_CODE, OUTPUT_QTY, DATE_ENTRY FROM dipping WHERE SUBSTR(LOT_CODE, 9,4) = 'P28'   ORDER BY DATE_ENTRY ASC;
    I attach the result of this query.

    I want only query or get is the LOT_CODE where the OUTPUT can suffix the ReqQty.


    Simple Example:

    ReqQty = 100
    Comp = P28

    LOT_CODE--OUTPUT_QTY---DATE_ENTRY
    00001P28--- 50------------2012-05-15
    00002P28----25------------2012-05-16
    00003P28----50------------2012-05-17
    00004P28----25-----------2012-05-18
    in query I need to get only the
    00001P28--- 50------------2012-05-15
    00002P28----25------------2012-05-16
    00003P28----50------------2012-05-17

    because it suffix my ReqQty as you can see in this LOT_CODE
    00003P28----50------------2012-05-17 i only need is 25 to suffix my Req
    Qty so I need to display only:

    00001P28--- 50------------2012-05-15
    00002P28----25------------2012-05-16
    00003P28----25------------2012-05-17

    Feel free to ask me if theirs any question for better understanding of my problem
    Thank you
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles