Re: insert a quoted string longer than 256 bytes ?
Posted in 1997
Hi!
Case 1) You are not allowed to have a literal string linger than 255 chars.
Haivings strings in general longer than this is
of course allowed, it's only literal strings that has this restriction.
Case 2) You not allowed to have expressions in the VALUES() clause of an
INSERT statement.
Case 3) You ARE allowed to have expressions in the SET clause of an UPDATE.
That is really it. I'm anazed that Case 2 is still true, but it is. This is
"fixed" in IUS...
Rgds
Karlsson
Anton Slabbinck wrote:
> Who do I insert a quoted string longer than 256 bytes ?
> I use Informix v7.1 on a Unix box with LiveWire and Perl DBD/DBI.
>
> - This doesn't work :
> insert into tmptable (1, '<a string longer than 256 bytes>');>
> - Even this doesn't work :
> insert into tmptable (1,'<a string from 250 bytes>' || '<a string from 50
> bytes>')>
> - But this works :
>
> insert into tmptable (1, 'temp');
> update tmptable set item = '<a string from 250 bytes>' || '<a string from> 50 bytes>' where id=1
>
> Why does the last one works, and the second not ?
> Any idea, solution ?
>
> thanks,
> Anton.