Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering table
Message
De
21/01/2005 04:14:02
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Filtering table
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00979204
Message ID:
00979204
Vues:
47
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!

********************************************************
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform