How do I insert values from text file into informax?
Posted in 2000
Topics: General Discussion
Hi there.. Is there any one to help me with this problem? I want some values from pure text file, that distinguished by a seperator (|), to put into informix. this is much like the dump command of mysql, I think :) Please show me the way in detail. How can I do this? my email: starzan@hanmail.net
"±è±¤ÅÂ" wrote:
>
> Hi there..
>
> Is there any one to help me with this problem?
> I want some values from pure text file, that distinguished by a seperator
> (|),
> to put into informix. this is much like the dump command of mysql, I think
> :)
> Please show me the way in detail.
>
> How can I do this?
If the file is not too large and the data is clean (ie no errors that would
prevent some rows from loading) you can use the LOAD command in dbaccess:
load from filename_containing_delimited_data
insert into table_to_hold_data;
If the file is very large and/or the data is not clean use the dbload
utility which is faster, can perform partial commits so it does not hold
many many locks as the LOAD command will, and it can log rows in error and
continue (the dbaccess LOAD command will stop at the first error and attempt
to rollback the entire transaction). Dbload is documented in the Migration
Guide available online at the Informix web site under <documentation>.
Art S. Kagel
LOAD FROM "dumpfilename" INSERT INTO tablename;
In DB-Access, but not ESQL/C. If you want full documentation on the
UNLOAD/LOAD
format, download SQLCMD from the IIUG archives, and look in the file on
unload.format.
"±è±¤ÅÂ" wrote:
> Is there any one to help me with this problem?
> I want some values from pure text file, that distinguished by a seperator
> (|),
> to put into informix. this is much like the dump command of mysql, I think
> :)
> Please show me the way in detail.
>
> How can I do this?
>
> my email: starzan@hanmail.net
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>