Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Effective date of prices
Message
From
06/01/1999 09:59:14
 
 
To
06/01/1999 08:32:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00173090
Message ID:
00173122
Views:
31
>I have a problem that I originally thought was simple, but somehow became complicated....
>
>I have two tables, both of which are out of my control, that stores invoices in one and the product cost that is effective from a certain date in another.
>
>The structures are similar to:
>
> Invoices - inv no, inv date, part no, quantity, etc...
> Price list - part no, price, effective date
>
>What I need to do, preferably in a query or set of queries, is to find the invoice value of all invoices between a certain period. This means that I must determine the correct value of each product when it was sold.
>
>Any ideas, even the solution, would be gratefully received.
>
>
>Jason

If I understand your question correctly then it should be:
Select SUM(Price) as TotalPrice, Invoices.Part_No ;
From Invoices,Price_List ;
Where Invoices.Part_No=Price_List.Part_No ;
And BETWEEN(Price_List.Effect_Date,dDate1,dDate2) ;
Group by Invoices.Part_No
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform