Re: dbload (or other tool) and TEXT columns
Posted in 1997
Topics: Connectivity: ODBC / JDBC / .NET, Data Types & Schema Design
Steve,
An easy way to concatenate fields from a text file and load a text datatype
field would be to use SQLMover. Simply use the MS or Intersolv ODBC text
file driver in your source end and a good Informix in the receiving end.
Define your text file in the ODBC manager. Assume your text file looks like
id, text1, text2, text3, text4 .... you write the following SQL Syntax
against your source text file ODBC driver: SELECT id,
newtext=text1+text2+text3+text4 from textfile.txt. Map the newtext field to
your Informix text field in the SQLMover mappings tab. In addition to text
datatypes, SQLMover handles replication/conversion of BINARY, BLOBS and
IMAGE datatypes as well. Download Sqlmover from http://www.sqlmover.com and
use the time-limited eval. key: 1JHHYDOHG. If you don't have a text file
ODBC driver you can download from the same location as SQLMover. Should you
have any questions please return to me or use the support form at
www.sqlmover.com. What's more - SQLMover replicates and converts between
any kind of database - not just text files and informix, Oracle, DB2, SQL
Server, Excel, Access, Progress, Ingres.
Regards,
Peder Holst
pederh@elektrosoft.se
SteveO <stownsen@pacbell.net> wrote in article
<346AB683.2BF7@pacbell.net>...
> I am moving a table from a non-informix DB to an informix DB.
> The other DB didn't have TEXT columns and they were implemented as
> a table (key, seq_num, varchar text field).
>
> I can get the data from the other table into a flat file and basically
> concatinate the multiple "text" fields into a single TEXT column
>
> My question is this...
> dbload appears to operate in two modes, column oriented (which would
> seem inappropriate given the variable length of the "text" column)
> And delimiter oriented...
> I am going to try to see if I can find a delimiter not used anywhere in
> the text... If I can, should the record look like:
>
> field1|field2|...|text_stuff|<newline> (Note: newlines do appear in
> the text_stuff)
>
> Is there a better way to upload text columns?
>
> Thanks!
>