Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A poster asked how to import a colon-delimited flat file into a table and export a table to a delimited file. Art Kagel suggested dbaccess LOAD FROM with DELIMITER, or dbload with a command file, which is faster and can commit partially. Javier suggested dbimport and dbexport -ss. Another poster suggested a parser/converter tool such as ParseRat.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
I have a flat file that is currently colon delimited (can be changed
with regex easily). I need to import this flat file into a table. Is
there a utility, or script that will do this for me? I've thought
about just using coldfusion server with <cfloop> but that doesn't seem
like it would be the best,or most efficient. Also, how would you go
about exporting a database to a flat file that is delimited with some
character? Any information, or references would be greatly appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
↪ replying to aginsberg@safeconnect.net
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
In dbaccess use the dbaccess LOAD command:
LOAD FROM 'somefile' DELIMITER ':' INSERT INTO sometable;
Or use dbload. You will need to write a commandfile but for larger loads it
is faster than dbaccess and can do partial commits so you do not blow the
lock table.
Simple dbload commandfile:
#########################################
FILE 'somefile' DELIMITER ':' x; #Where x is the number of fields in file
INSERT INTO sometable;#########################################
Art S. kagel
aginsberg@safeconnect.net wrote:
>
> I have a flat file that is currently colon delimited (can be changed
> with regex easily). I need to import this flat file into a table. Is
> there a utility, or script that will do this for me? I've thought
> about just using coldfusion server with <cfloop> but that doesn't seem
> like it would be the best,or most efficient. Also, how would you go
> about exporting a database to a flat file that is delimited with some
> character? Any information, or references would be greatly appreciated.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
In article <84ejth$r3b$1@nnrp1.deja.com>,
aginsberg@safeconnect.net wrote:
> I have a flat file that is currently colon delimited (can be changed
> with regex easily). I need to import this flat file into a table. Is
> there a utility, or script that will do this for me? I've thought
> about just using coldfusion server with <cfloop> but that doesn't seem
> like it would be the best,or most efficient. Also, how would you go
> about exporting a database to a flat file that is delimited with some
> character? Any information, or references would be greatly
appreciated.
A generic parser/converter like ParseRat
(http://www.guysoftware.com/parserat.htm) can turn a colon-delimited
file (or any delimiter, for that matter) into a file with any other
delimiter or into a dBase (*.DBF) file which pretty much anything can
import directly.
Sent via Deja.com http://www.deja.com/
Before you buy.
↪ replying to aginsberg@safeconnect.net
Javier — — source: Informix-list mailing list archive (1991-1998)
Use the utility "dbimport". There is an environment variable for the
delimiter. Dbexport does the opposite. Use the -ss option.
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.