Re: Import csv file and keep trailing spaces - URGENT REQUEST by sbs
sbs
Wed Nov 01 06:27:37 CST 2006
Thanks, Stefan.
This seems to work fine in VFP 9.
The app is currently in VFP8. Is there any way to achieve this in VFP8?
On Nov 1, 11:08 pm, "Stefan Wuebbe" <stefan.wue...@gmx.de> wrote:
> A VarChar type seems to keep the trailing space in the
> "something" field of the last row for me.
> CREATE CURSOR temp ;
> (id c(10), surname c(20), firstname c(20), ;
> otherid c(10), something varchar(50), thirdid c(20))
> APPEND FROM GETFILE() TYPE CSV
> BROWSE
>
> hth
> -Stefan
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us atwww.prolib.deorwww.AFPages.de
> -----------------------------------------------------------
>
> <s...@sensibus.com.au> schrieb im Newsbeitragnews:1162378353.843481.290960@h48g2000cwc.googlegroups.com...
>
>
>
> >I have an urgent need to import a csv file and some of the data has
> > trailing spaces which I have to retain and later use this data intact
> > by sending it to a printer.
>
> > Every time I import the data I lose the trailing spaces.
>
> > An example of the file with 6 fields is below:
>
> > IDNO, LNAME, FNAME, code1, code2, code3
> > 1033501, ALEXANDER, JOHN,1,PAQVSBUJA0 .9W20.WPSUG8J7P9YA,15071
> > 1007267, ALEXANDER, BILL,1,PA1QSBUJA0 .9W-.V0PSUG8J7P7ZU,31910
> > 1032692, ALEXANDER, JEAN,2,PAQVSBUJA0 .9W-9.-ZSUG8J7RGT9,32216
> > 1032027, ALEXANDER, PAUL,1,PAQVSBUJA0 .9W2ERYPSUG8J7R - ,12386
>
> > Note that the code 3 field sometimes has a record with a trailing space
> > (see last record)
>
> > Can anybody advise how I should go ?
>
> > Thanks.- Hide quoted text -- Show quoted text -