Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select and sum
Message
 
 
À
19/06/2005 14:51:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01024603
Message ID:
01024714
Vues:
16
You cannot compare date field 'dat' with character strings ("01/01/2005") AND ("31/12/2005"). They have to be the date constants or variables.

>i change it but i get error message
>Operator/operand type mismatch
>
>SELECT divi, mac1, ;
>	SUM(IIF(MONTH(dat)=1 AND typ = 1, INT(CTOT(true) - CTOT("00:00")), 000000)) AS m1_m, ;
>	SUM(IIF(MONTH(dat)=1 AND typ = 2, INT(CTOT(true) - CTOT("00:00")), 000000)) AS m1_a, ;	
>	SUM(IIF(MONTH(dat)=2 AND typ = 1, INT(CTOT(true) - CTOT("00:00")), 000000)) AS m2_m, ;
>	SUM(IIF(MONTH(dat)=2 AND typ = 2, INT(CTOT(true) - CTOT("00:00")), 000000)) AS m2_a ;	
>FROM table1 ;
>WHERE dat BETWEEN ("01/01/2005") AND ("31/12/2005") ;
>GROUP BY 1,2
>? m1_m,m1_a
>? m2_m,m2_a
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform