Page 1 of 1
APPEND FROM DELIMITED WITH other char not comma ARE NOT IMPL
Posted: Sat Sep 08, 2012 3:10 am
by arturo_lopesoria
Hello all
I'm Using hmg v3.0.25. I'm trying to append to a dbf from a delimited data txt file using:
APPEND FROM xcFile DELIMITED WITH optional clause
I can actually import data this way if the fields from file txt came delimited with commas.
But if data are separated with other different character as Pipe '|' APPEND FROM xcFile DELIMITED WITH '|' do not function as clipper/dbase original design was made
It seems like if nothing else was need this option with harbour actually..
or maybe I am doing something bad?
Thanks in advance
Arturo
Im Using hmg v3.0.25
C:\hmg.3.0.25\HARBOUR\bin>harbour
Harbour 2.0.0 (Rev. 13372)
Copyright (c) 1999-2010,
http://www.harbour-project.org/
Saludos
Arturo
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Sat Sep 08, 2012 3:30 am
by arturo_lopesoria
I found the way this command is implemented in harbour:
APPEND FROM DELIMITED WITH PIPE
Is very usefull if comma may to be used inside a field, as part of data, like in a addres, etc..
I hope this will hope to somebody
Saludos desde Mexico
Arturo.
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Sat Sep 08, 2012 4:22 am
by Rathinagiri
Thanks a lot for the info.
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Sat Sep 08, 2012 9:39 am
by esgici
Hola Arturo, saludos desde Turkiye
arturo_lopesoria wrote:
APPEND FROM xcFile DELIMITED WITH '|' do not function.
...
I found the way this command is implemented in harbour:
APPEND FROM DELIMITED WITH PIPE
Is very usefull if comma may to be used inside a field, as part of data, like in a addres, etc..
Does "
PIPE" is a built-in (by Harbour) constant or we have declare and initialize it ?
such as
Code: Select all
#define PIPE "|" // .or. CHR( 124 )
.or.
PUBLIC PIPE "|" // .or. CHR( 124 )
Anyway it isn't logical
Code: Select all
APPEND FROM xcFile DELIMITED WITH PIPE
will work, though
Code: Select all
APPEND FROM xcFile DELIMITED WITH '|'
doesn't work.
If so, IMHO this will be considered a bug in Harbour
Any opinion

Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Sat Sep 08, 2012 1:37 pm
by Rathinagiri
This is from Harbour changelog:
APPEND FROM ... DELIMITED WITH TAB
APPEND FROM ... DELIMITED WITH PIPE
APPEND FROM ... DELIMITED WITH ( { cStrDelim, cFldSeparator } )
It seems that, 'PIPE' is hard coded in src/rdd/dbcmd.c
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Sat Sep 08, 2012 7:24 pm
by esgici
Thanks Rathi
Best regards
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Sat Sep 08, 2012 9:24 pm
by arturo_lopesoria
Esgici, Rathi.
Thanks to both as allways
Arturo
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Fri Nov 23, 2012 2:54 pm
by Czarny_Pijar
The command
COPY FIELDS ID,NAME TO temp.txt DELIMITED
works fine, but the
APPEND FROM temp.txt TYPE DELIMITED
can't even pass the compile process...
==================================
EDIT: never mind and forget it, JPARADA show me the right way*, thank you.
*
http://hmgforum.com/viewtopic.php?f=24& ... TED#p10950
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Posted: Fri Nov 23, 2012 4:02 pm
by Jairo Maia
Czarny_Pijar wrote:APPEND FROM temp.txt TYPE DELIMITED
can't even pass the compile process...
Can't have the TYPE. Try in this way: