Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement How To?
Message
De
26/02/2006 16:26:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Statement How To?
Divers
Thread ID:
01099289
Message ID:
01099289
Vues:
66
I need to list the last items purchased by customer. The sales transaction data is stored two separate files ARTRAN(Current Invoice Transactions) and ARYTRN(History Invoice Transactions). I have been able to create one cursor with data from the current and history files.(See Attached) How can I modify this to only retrieve items from the last invoice?

lcDirectory = "D:\demo\pro73\data01\"
lcCursor = "Report"

SELECT INVNO,;
ITEM,;
CUSTNO,;
LOCTID,;
DESCRIP,;
COST,;
PRICE,;
QTYORD,;
QTYSHP,;
INVDTE,;
EXTPRICE,;
CURRHIST ;
FROM (lcDirectory + 'ARTRAN01') tran1 ;
WHERE currhist = " " ;
UNION ALL;
SELECT INVNO,;
ITEM,;
CUSTNO,;
LOCTID,;
DESCRIP,;
COST,;
PRICE,;
QTYORD,;
QTYSHP,;
INVDTE,;
EXTPRICE,;
CURRHIST ;
FROM (lcDirectory + 'ARYTRN01') ytrn1 ;
into cursor lcCursor
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform