Dear all,
I would like to ask how to
1. To select from a table, namely StockPurchase, like so "SELECT DISTINCT sCode, sDetail, sID FROM stockPurchase WHERE sID= ?lsID AND oMID = ?loMID"
2. Then, add other associate field from the same table eg. pCost,pDiscount,oMID
The one I think of as follows:
SELECT sCode, sDetail,pCost,pDiscount,sID,oMID FROM stockpurchase where exists;
(SELECT DISTINCT sCode, sDetail, sID FROM stockPurchase WHERE sID= ?lsID AND oMID = ?loMID) ORDER BY sCODE
However, duplicate records show up?! Where is the problem?
Thanks in advance
Best regards,
Aaron Chu
********************************************************
Working with Visual FoxPro is a lot of FUN!
********************************************************