Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Sql
Divers
Thread ID:
00339044
Message ID:
00339199
Vues:
15
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform