Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is wrong?
Message
De
29/05/2005 07:07:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FRX2Any
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01018429
Message ID:
01018437
Vues:
9
Hello,

using SUM in combination with IIF maybe easier:
lnYear = yearfromsomewhere

SELECT DISTINCT dl.date, ;
                dl.code, ;
                dl.category, ;
                SUM(IIF(ca.category="H",1,0)) AS CntCatH, ;
                SUM(IIF(ca.category="B",1,0)) AS CntCatB, ;
FROM dlyatten dl LEFT JOIN (alias11) ca ON dl.date = ca.date ;
WHERE YEAR(dl.date) = lnYear ;
INTO CURSOR temp
(to Khalid)
not tested, and may give you wrong results .. i don't know your data structures .. but i think you'll get the idea ..


Regards
Christian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform