newphpcoder Posted May 15, 2012 Share Posted May 15, 2012 Hi...I have atable: bomfields:Comp = P28ReqQty = 31968and I have tabletable: dippingfields needed to get dataLOT_CODEOUTPUT_QTYDATE_ENTRYnow I only want to get LOT_CODE and OUTPUT_QTY where can suffix the ReqQty ORDER BY DATE_ENTRYI tried this query: 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 = 100Comp = P28LOT_CODE--OUTPUT_QTY---DATE_ENTRY00001P28--- 50------------2012-05-1500002P28----25------------2012-05-1600003P28----50------------2012-05-1700004P28----25-----------2012-05-18in query I need to get only the00001P28--- 50------------2012-05-1500002P28----25------------2012-05-1600003P28----50------------2012-05-17because it suffix my ReqQty as you can see in this LOT_CODE00003P28----50------------2012-05-17 i only need is 25 to suffix my ReqQty so I need to display only:00001P28--- 50------------2012-05-1500002P28----25------------2012-05-1600003P28----25------------2012-05-17Feel free to ask me if theirs any question for better understanding of my problemThank you dipping.zip 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now