Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sales Value
Message
From
10/11/2010 05:31:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Sales Value
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01488700
Message ID:
01488700
Views:
123
Dear Sir,

I have following data
&& opening stock table
create  cursor open_stock (dates d(8),codes c(4),products c(15),qty n(3),rate n(6,2),amount n(6,2))
insert into open_stock values({^2009-07-01},'1401','Coke 250ml',2,14.45,0)
replace all amount with qty*rate

&& purchase table
create  cursor purchase (dates d(8),codes c(4),products c(15),qty n(3),rate n(6,2),amount n(6,2))
insert into purchase values({^2009-07-02},'1401','Coke 250ml',2,15.30,0)
insert into purchase values({^2009-07-01},'1401','Coke 250ml',4,16.80,0)
insert into purchase values({^2009-07-03},'1401','Coke 250ml',6,13.25,0)
replace all amount with qty*rate

&& sale table
create  cursor sales (dates d(8),codes c(4),products c(15),qty n(3),rate n(6,2),amount n(6,2))
insert into sales values({^2009-07-03},'1401','Coke 250ml',6,0,0)
insert into sales values({^2009-07-05},'1401','Coke 250ml',3,0,0)
I want to get sales amount shown in picture

http://www.foxite.com/uploads/1acd5612-e92f-4107-ad18-028aa5109876.jpg
Reply
Map
View

Click here to load this message in the networking platform