Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loop
Message
From
15/02/2005 18:29:00
 
 
To
15/02/2005 16:58:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Loop
Miscellaneous
Thread ID:
00987226
Message ID:
00987282
Views:
31
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform