Re: Importing flat files to database
Posted in 1999
from command line:
export DBDELIMITER=; or whatever character you want to delimit with
from isql:
(to import) load from filename insert into tablename
dbload is better if you are going to regularly import large files, it has
parameters that allow you to import a number of records at a time, continue on
error, specify a delimiter, etc (RTFM for syntax and parameters).
(to export) unload to filename select fieldnames from tablenames where
conditions
hope this helps
Sue
aginsberg@safeconnect.net on 30/12/99 14:45:18
Please respond to aginsberg@safeconnect.net
To: informix-list@iiug.org
cc: (bcc: Sue Davidson/EXE)
Subject: Importing flat files to database
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.