Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case Endcase
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Case Endcase
Miscellaneous
Thread ID:
00658264
Message ID:
00658264
Views:
50
I have the following code. I am trying to delete records in a table. Depending on the day of week, the program needs to delete a certain calculation of the date on the PC.

USE ach_clears IN 0 ORDER clear_date EXCLUSIVE
SELECT ach_clears

DO CASE

CASE = CDOW(DATE()) = 'Monday'

DELETE ALL FOR clear_date > DATE() - 4

CASE = CDOW(DATE()) = 'Tuesday'

DELETE ALL FOR clear_date > DATE() - 4

CASE = CDOW(DATE()) = 'Wednesday'

DELETE ALL FOR clear_date > DATE() - 5

CASE = CDOW(DATE()) = 'Thursday'

DELETE ALL FOR clear_date > DATE() - 3

CASE = CDOW(DATE()) = 'Friday'
?CDOW(DATE())
SELECT ach_clears
DELETE ALL FOR clear_date > DATE() - 3

ENDCASE

USE IN ach_clears

It seems that none of these conditions are true and nothing gets deleted. Am I thinking wrong?
Thanks in advance for your help! :-)
Randall L. Johnson
Next
Reply
Map
View

Click here to load this message in the networking platform