Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL where problem
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00051392
Message ID:
00051525
Views:
36
>>Now they want it broken down by:
>>1)Last three months
>>2)Last six months
>>3)1997
>>4)1996
>>
>>I guess i'm back to four sql statements with a merge.
>
>Generally speaking, yes.

Claude, could you use Ed's method but change the "ceiling(month(date)/3)" to a variable "ceiling(month(date)/n)" and pass in the value of n? Users's could pick from your list above and you could then call the SQL with the correct value of n. For 1997 and 1996 you would have to change the variable to 'Year(date) = 1996'. This could all be run from a table, so as your boss adds new items you just add the PickList value and the SQL variable to the table. Then tell him it took 5 hours :-)

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform