Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count
Message
De
21/09/2004 10:51:04
 
 
À
21/09/2004 02:39:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Count
Divers
Thread ID:
00943945
Message ID:
00944553
Vues:
22
SELECT ncli, COUNT(ncli) AS cnt_ncli, MAX(telno) AS last_telno FROM active ;
   GROUP BY 1 INTO CURSOR telno READWRITE
INDEX ON ncli TAG ncli
SELECT active
SET RELATION to ncli INTO telno
REPLACE ALL active.Count1 WITH telno.cnt_ncli,active.Count2 WITH IIF(active.telno=telno.last_telno,telno.cnt_ncli,0)
>hi,
>thank you for reply,
>it works,
>i need another things ,i want to add the total of tel.lines to another field(count2)
>via code under.
>as..
>
>clint_no(ncli) telno count 1   count 2
>        1      555    3          0
>        1      444    3          0
>        1      666    3          3   this is what i need to add to (mytable.count2)
>
>        2      555    6          0
>        .       .     .          .
>
>        .       .     .          6  this is what i need to add to (mytable.count2)
>
>
>
>
>
>SELECT ncli, COUNT(ncli) AS telno FROM active ;
>   GROUP BY 1 INTO CURSOR telno READWRITE
>INDEX ON ncli TAG ncli
>SELECT active
>SET RELATION to ncli INTO telno
>REPLACE ALL active.Count1 WITH telno.telno
>
>thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform