Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting dates
Message
From
28/11/2006 08:28:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Selecting dates
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01172906
Message ID:
01172906
Views:
56
Hi all:

Consider the following data:
Sale Date   P         Q
1/4/06      9         3
2/4/06      2         7
2/4/06      3         8
2/4/06      6         6
3/4/06      1         5
5/4/06      4         2
5/4/06      5         9
I want to construct a select statement that will return the following:
latest_date  P_lt  q_lt  date-1  p-1  q-1  date-rest  p-rest  q-rest
5/4/06       9     11    3/4/06  1    5    {}         20      24
In other words, I want to get a total of products sold on the latest date, whatever that is; products sold on the date before the latest date, whatever that is; and products sold on all the other prior dates.

Can this be done?

Thanks,

Yossi
Next
Reply
Map
View

Click here to load this message in the networking platform