Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO...DELIMITED bug?
Message
From
20/10/2006 03:58:54
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
19/10/2006 08:54:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01163003
Message ID:
01163570
Views:
9
Hi Fabio,

after playing a little bit more I have
CREATE CURSOR test1 (c1 c(1),v1 v(1),v3v v(4) DEFAULT 'v ',v3e v(3),c3v c(3) DEFAULT 'v  ',c3e c(3),i I)
APPEND BLANK
COPY TO test1.txt DELIMITED WITH "" WITH CHARACTER "|"
MODIFY FILE test1.txt
My return is
 ||v ||v||0
I think the result is a wrong because
wrong use of CSV
csv is without trailing spaces. if we would have trailing spaces on an CSV file its mostly the same as a SDF, we would waste a lot of space for nothing
wrong use of types
VFP fieldtypes have no meaning in CSV so CHAR and VARCHAR should be stored in the same way.
the result is not consitent
some times we get spaces, sometimes not
the result is not consitent even if we consider that it may have different results for differnt VFP field types.
Character is sometimes trimmed and sometimes not
Varchar is sometimes trimmed and sometimes not
the result is missleading
for VARCHAR, why we get one trailing space if we have two in reality?
If we consider that the result will somehow show the VFP fieldtype than it does the wrong way
VARCHAR gets the trailing spaces and CHAR is trimmed

BTW:
COPY TO ... CSV generates the same result

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform