All Forums Database
adpcharlotte 1 post Joined 10/14
13 Oct 2014
Failure: 3738 error while inserting String in a VARCHAR field. Need alternative way

I get the following error while trying to insert a String (containing apostrophes, 33121 characters in total) into VARCHAR(35000) field:

INSERT Failed. 3738:  String is longer than 31000 characters. 

Is there an alternative way to insert data? Like different data type or special procedures? I use Teradata version. I'm not sure if this question was already asked and resolved (I browsed through and did not find an alternative way to insert data).

Raja_KT 1246 posts Joined 07/09
13 Oct 2014

3738   String is longer than 31000 characters.


Quoted strings cannot be longer than 31000 physical characters.

Generated By:

LEX modules.

For Whom:

End User.


To insert longer strings, the user must have a USING clause and a DATA parcel that contain the characters.


Correct the statement to have a shorter string, and resubmit the request.


Can you try with clob,blob....?

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

CarlosAL 512 posts Joined 04/08
14 Oct 2014

It seems you are trying to insert an explicit string using quotes (''). The quoted strings cannot exceed 31000 chars. Your option is using an IMPORT file with the strings that you need to insert with a USING clause:
USING (long_string VARCHAR(35000),
            more_data ...)
INSERT INTO YOUR_TABLE (the_string_column, ...) VALUES (:long_string, ...)      

You must sign in to leave a comment.