Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Sql
Miscellaneous
Thread ID:
00339044
Message ID:
00339199
Views:
16
>hi Mark:
> I found a way to make the sql works the way I want it to but can you tell me why: if I substitute the cdow(sart) with a date {01/10/2000}, it will work.
>Thank you for all your replies.
>sherry

Arghhh! I missed that. If I see correctly, cdow[start], is only needed regardless of the day. You do not need to add 1, 2, 3 or 4 to start. That is the problem. Sorry for wasting so much time here. Change the SQL to [spacing only added for readability]:
select f_name,l_name, ext, DEPT, ;
   sum(iif(cdow(start)== "Monday"   ,LENGTH, 0)) AS MON,;
   sum(iif(cdow(start)== "Tuesday"  ,LENGTH, 0)) AS TUES, ;
   sum(iif(cdow(start)== "Wednesday",LENGTH, 0)) AS WED,;
   sum(iif(cdow(start)== "Thursday" ,LENGTH, 0)) AS THU, ;
   sum(iif(cdow(start)== "Friday"   ,LENGTH, 0)) AS FRI ;
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform