Re: dbload problems
Posted in 1997
Topics: Server Administration
devis wrote:
>
> I want importing a file ascii into a table.
>
> the file ascii row is like this:
> val1|val2|val3
>
> What i must write, dbload ...
Create a command file like so:
FILE "filename" DELIMITER "|" 3;
INSERT INTO tablename(colname1, colname2, colname3);
Then run dbload as follows:
dbload -d databasename -c commandfilename -l logfilename
Or simply use SQL by creating a file with a .sql suffix like so:
LOAD FROM "filename"
INSERT INTO tablename(colname1, colname2, colname3);
Then run dbaccess as follows:
dbaccess databasename sqlfilename
Hope that helps,
--
Mark.
+------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:marks@west.co.za +-----------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work, force it! |
|Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!|
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+-----------------------------------------+