Help me ! insert Long String
Posted in 2000
Topics: General Discussion
I have made some tables that include char type column, and that column
length greater than 256byte.
So I want insert into a long string the column but the string could not be
inserted the table.
Example
create table test (longchar char(500));
insert into test values
('123456789012345678901234567890.........12345678901234567890'); |_______________________________________________________|
300 Bytes
Could I insert this long string!!!!
>>>>> " " == '''''' <seol@hotkey.to> writes:
> I have made some tables that include char type column, and that
> column length greater than 256byte.
> So I want insert into a long string the column but the string
> could not be inserted the table.
> Example create table test (longchar char(500));
> insert into test values
> ('123456789012345678901234567890.........12345678901234567890'); > |_______________________________________________________| 300
> Bytes
> Could I insert this long string!!!!
Provided that string had printable characters, you should be able to.
What was the error message and numbers associated with the INSERT statement?
Mark
--
"A man will fight harder for his interests than for his rights."
-- Napoleon
"¼³Àç¸í" wrote:
>
> I have made some tables that include char type column, and that column
> length greater than 256byte.
>
> So I want insert into a long string the column but the string could not be
> inserted the table.
>
> Example
> create table test (longchar char(500));>
> insert into test values
> ('123456789012345678901234567890.........12345678901234567890');> |_______________________________________________________|
> 300 Bytes
>
> Could I insert this long string!!!!
As Mark Oberfield said, not like that. If you're using DB-Access, then
LOAD is your only hope. If you're using ESQL/C or ODBC or JDBC, then
replace the string literal with a placeholder question mark, and supply
the value as a parameter (details vary according to interface, but USING
:stringvar in ESQL/C).
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"