APPEND FROM DELIMITED WITH other char not comma ARE NOT IMPL
Moderator: Rathinagiri
- arturo_lopesoria
- Posts: 31
- Joined: Tue Sep 09, 2008 3:05 am
- Location: Mexico
APPEND FROM DELIMITED WITH other char not comma ARE NOT IMPL
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
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
- arturo_lopesoria
- Posts: 31
- Joined: Tue Sep 09, 2008 3:05 am
- Location: Mexico
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
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.
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.
- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Thanks a lot for the info.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Hola Arturo, saludos desde Turkiye 
such as
Anyway it isn't logical
will work, though
doesn't work. 
If so, IMHO this will be considered a bug in Harbour
Any opinion

Does "PIPE" is a built-in (by Harbour) constant or we have declare and initialize it ?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..
such as
Code: Select all
#define PIPE "|" // .or. CHR( 124 )
.or.
PUBLIC PIPE "|" // .or. CHR( 124 )
Code: Select all
APPEND FROM xcFile DELIMITED WITH PIPE
Code: Select all
APPEND FROM xcFile DELIMITED WITH '|'

If so, IMHO this will be considered a bug in Harbour

Any opinion

Last edited by esgici on Sat Sep 08, 2012 9:34 pm, edited 1 time in total.
Viva INTERNATIONAL HMG 

- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
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
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
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Thanks Rathi 
Best regards

Best regards
Viva INTERNATIONAL HMG 

- arturo_lopesoria
- Posts: 31
- Joined: Tue Sep 09, 2008 3:05 am
- Location: Mexico
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Esgici, Rathi.
Thanks to both as allways
Arturo
Thanks to both as allways
Arturo
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
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
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
- Attachments
-
- append_from.PNG (18.22 KiB) Viewed 11404 times
- Jairo Maia
- Posts: 53
- Joined: Sun Jul 17, 2011 1:47 pm
- Location: Campinas - SP - Brazil
Re: APPEND FROM DELIMITED WITH other char not comma ARE NOT
Can't have the TYPE. Try in this way:Czarny_Pijar wrote:APPEND FROM temp.txt TYPE DELIMITED
can't even pass the compile process...
Code: Select all
APPEND FROM temp.txt DELIMITED