Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stock Register
Message
De
05/06/2009 21:46:27
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Stock Register
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01404074
Message ID:
01404074
Vues:
92
Dear Experts

I have three dbf’s as follows

Master.dbf
Code------product-------qty
--1---------apple-----------2
--2---------mango---------8
--3---------orange---------4
--4---------melon----------3
--5---------potato----------1

Purchase.dbf
----Date-----Code -------qty
01/06/09-----1------------6
01/06/09-----3------------5
01/06/09-----5------------7
02/06/09-----1------------6
02/06/09-----3------------5
02/06/09-----5------------7
03/06/09-----1------------10
03/06/09-----3------------12
03/06/09-----5------------14

Sales.dbf
----Date-----Code -------qty
01/06/09-----1------------5
01/06/09-----3------------4
01/06/09-----5------------6
02/06/09-----1------------5
02/06/09-----3------------4
02/06/09-----5------------1
03/06/09-----1------------8
03/06/09-----3------------9
03/06/09-----5------------6

Now I want to get stock values for date=01/06/09 as
Master.qty+purchase.qty-sales.qty

The Result will be look like this
Code------product-------open-----purchased------Sold-------Closing
--1---------apple------------2-----------6 -------------5------------3
--2---------mango----------8-----------0 -------------0------------8
--3---------orange----------4-----------5 -------------4------------5
--4---------melon-----------3-----------0 -------------0------------3
--5---------potato-----------1-----------7 -------------6------------2

And then I want to get stock values for between(date,02/06/09,03/06/09) as

Code------product-------open-----purchased------Sold-------Closing
--1---------apple-------------3-----------16 --------------13------------6
--2---------mango-----------8-------------0 ---------------0------------8
--3---------orange-----------5-----------17--------------13------------9
--4---------melon------------3-------------0----------------0------------3
--5---------potato------------2------------21 --------------7------------16

Please help
Répondre
Fil
Voir

Click here to load this message in the networking platform