Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WEEK in select SQL
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01165550
Message ID:
01165560
Views:
11
This message has been marked as the solution to the initial question of the thread.
Maybe something along the lines of
SELECT WEEK(Rtv_Head.RtvDate) as nWeek, MIN(Rtv_Head.RtvDate - Dow(Rtv_Head.RtvDate) + 1)) as dWeek_Start, ;
	SUM(Qty*Price) AS Ret_Total ... from ... group by 1
Completely untested and without giving it a second thought, so it might be completely wrong

[Update]I wrote Week instead of Dow, just corrected it
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform