Re: beginners question : how to import textfiles into databases
Posted in 1996
jeroen clarysse wrote:
>
> Here goes : how can I, using the dbimport tool get some tab-delimited
> text-file data into my database ? (the file comes over from PC access
> database)
>
The default delimiter for fields in Informix is the vertical bar ("|"). You can
generate the files from Access with that delimiter, or convet your files using the
tr UNIX utility: tr "\\011" "|" <customer.unl >customer.txt
If you don't want to import the entire database is easier to put load sentences
in a file .sql and execute with dbaccess:
import.sql:
load from "customer.txt" insert into customers;
load from "orders.txt" insert into orders;
If you database name is "dbname", you can execute dbaccess like this:
dbaccess dbname import.sql