Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering table
Message
From
21/01/2005 04:14:02
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Filtering table
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00979204
Message ID:
00979204
Views:
46
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!

********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform