Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: khubaib khalid
  Where is khubaib khalid?
 HaroonAbad
 Pakistan
 khubaib khalid
 Tags
Subject: RE: copy to text
Thread ID: 228326 Message ID: 228331 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Monday, May 18, 2009 10:53:17 AM         
   


>
> COPY TO mytxt.txt DELIMITED WITH , WITH CHARACTER ';'
> 

> I want to copy a numaric filed as 1,2,3,4...........
> but with this command it is being like this
> ,1,
> ,2,
> ,3,
> ....
> how it will be done with my desire

You want all rows to be columns in a single row?

CREATE CURSOR temp (test i)
INSERT INTO temp VALUES (1)
INSERT INTO temp VALUES (2)
INSERT INTO temp VALUES (3)
c = ''
SCAN
	c = c + IIF(EMPTY(c),'',',') + TRANSFORM(test)
ENDSCAN
? c
STRTOFILE(c,'mytxt.txt')
MODIFY FILE mytxt.txt



hth
-Stefan

ENTIRE THREAD

copy to text Posted by khubaib khalid @ 5/18/2009 10:39:26 AM
RE: copy to text Posted by Yousfi Benameur @ 5/18/2009 10:50:05 AM
RE: copy to text Posted by Cetin Basoz @ 5/18/2009 10:50:46 AM
RE: copy to text Posted by khubaib khalid @ 5/18/2009 11:02:41 AM
RE: copy to text Posted by Cetin Basoz @ 5/18/2009 11:10:59 AM
RE: copy to text Posted by khubaib khalid @ 10/4/2009 5:40:09 AM
RE: copy to text Posted by Stefan Wuebbe @ 5/18/2009 10:53:17 AM
RE: copy to text Posted by Anders Altberg @ 10/4/2009 3:40:39 PM
RE: copy to text Posted by khubaib khalid @ 10/4/2009 4:18:21 PM