Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loop
Message
De
15/02/2005 18:29:00
 
 
À
15/02/2005 16:58:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Loop
Divers
Thread ID:
00987226
Message ID:
00987282
Vues:
30
>I have a cursor called "temp" with a listing of usernames. I would like it to loop through the second command and create a txt file for every user in my temp cursor. It's only grabbing the first user. Any help appreciated.
>
>
>SELECT sendername FROM special;
> GROUP BY sendername;
> into cursor temp
>
> count1 = RECCOUNT()
>
>
>FOR n = 1 TO count1
>  SELECT customer, name, descriptions FROM special WHERE temp.sendername=sendername
>  SKIP 1
>  CD c:
>  COPY TO (temp.sendername) deli with ""  with tab
>
>  endfor
>
If you don't mind an xBase solution
SELECT sendername,customer, name, descriptions;
   FROM special;
   ORDER BY sendername;
   INTO CURSOR temp

            OR --- If there is an Index Tag on sendername

SELECT special
SET ORDER TO sendername
GO TOP


m.lcSendername = sendername
DO WHILE NOT EOF()
    COPY TO (m.lcSendername) FIEL customer,name,descriptions ;
      DELI WITH " " WITH TAB;
      WHILE sendername = m.lcSerndername
ENDDO
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform