Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
minboy asked how to insert strings over 256 bytes into a CHAR column on IDS 7.24, since quoted literals were limited. Art S. Kagel said to use 4GL, ESQL/C, CLI, DBD::Informix, dbload or sqlcmd instead of dbaccess. Leonids Voroncovs showed inserting a first part, then appending more with UPDATE ... SET ls = ls || 'next part'.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
minboy@my-deja.com — — source: Informix-list mailing list archive (1991-1998)
I began to use Informix Dynamic Server 7.24 these
days.
I found that we can define a char type maximum to
32576 bytes. But a quoted string only allow less
than 256 bytes. Then how should I insert,update a
String more than 256 bytes to DB?
Any easy way?
Please help me!!!
Thank you
Sent via Deja.com http://www.deja.com/
Before you buy.
↪ replying to minboy@my-deja.com
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Use a tool other than dbaccess to import the data. 4GL, ESQL/C, CLI,
DBD/DBI Informix for Perl any of these will let you write applications that
can insert longer strings into CHAR type columns.
Art S. Kagel
minboy@my-deja.com wrote:
>
> I began to use Informix Dynamic Server 7.24 these
> days.
> I found that we can define a char type maximum to
> 32576 bytes. But a quoted string only allow less
> than 256 bytes. Then how should I insert,update a
> String more than 256 bytes to DB?
> Any easy way?
> Please help me!!!
> Thank you
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
↪ replying to minboy@my-deja.com
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Forgot to mention using dbload and/or Jonathan Leffler's sqlcmd package.
Art S. Kagel
minboy@my-deja.com wrote:
>
> I began to use Informix Dynamic Server 7.24 these
> days.
> I found that we can define a char type maximum to
> 32576 bytes. But a quoted string only allow less
> than 256 bytes. Then how should I insert,update a
> String more than 256 bytes to DB?
> Any easy way?
> Please help me!!!
> Thank you
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
minboy@my-deja.com wrote:
> Then how should I insert,update a
> String more than 256 bytes to DB?
CREATE TABLE long_string (
id INTEGER PRIMARY KEY,
ls CHAR( 32000 )
);
INSERT INTO long_string VALUES ( 1, 'First part of the long string' );
UPDATE long_string SET ls = ls || 'Second part of the long string' WHEREid =1;
...
UPADTE long_string SET ls = ls || 'Last part of the long string' WHERE
id = 1;
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.