SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

ERROR: Teradata execute: Right truncation of string data.

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

ERROR: Teradata execute: Right truncation of string data.

I wrote a load to Teradata using SAS DI 4.2.

I'm using a Join with USER WRITTEN body to do the

proc sql ;

connect to TERADATA

         (

             SERVER=THE_SERVER AUTHDOMAIN='the_auth_domain'  SCHEMA=the_schema         );

execute (

INSERT INTO target_table

(column1, column2, etc)

Select column1, column2, etc.

FROM source1

INNER JOIN source2 on SOURCE1.COLUMNX= SOURCE2.COLUMNXSmiley Wink

by Teradata;

when run

ERROR: Teradata execute: Right truncation of string data.

btw - this is a known problem with SAS interface to Teradata: 14383 - "ERROR: Teradata execute: Right truncation of string data" when usingthe SAS/ACCESS Interfac...

the workaround is to:

To resolve this problem, use MODE=TERADATA. This MODE is documented in

the Teradata white paper. Please see the link below:

how would I do that in SAS DI?


Accepted Solutions
Solution
‎02-15-2013 11:18 PM
Super User
Super User
Posts: 7,042

Re: ERROR: Teradata execute: Right truncation of string data.

Did you try adding the MODE option to the connect statement?

proc sql ;

  connect to TERADATA

         (

             SERVER=THE_SERVER AUTHDOMAIN='the_auth_domain'  SCHEMA=the_schema       

             MODE=TERADATA

         )

  ;

  execute

    (

      INSERT INTO target_table (column1, column2, etc)

      Select column1, column2, etc.

      FROM source1

         INNER JOIN

           source2

      on SOURCE1.COLUMNX= SOURCE2.COLUMNX

     ) by Teradata

  ;

View solution in original post


All Replies
Solution
‎02-15-2013 11:18 PM
Super User
Super User
Posts: 7,042

Re: ERROR: Teradata execute: Right truncation of string data.

Did you try adding the MODE option to the connect statement?

proc sql ;

  connect to TERADATA

         (

             SERVER=THE_SERVER AUTHDOMAIN='the_auth_domain'  SCHEMA=the_schema       

             MODE=TERADATA

         )

  ;

  execute

    (

      INSERT INTO target_table (column1, column2, etc)

      Select column1, column2, etc.

      FROM source1

         INNER JOIN

           source2

      on SOURCE1.COLUMNX= SOURCE2.COLUMNX

     ) by Teradata

  ;

Occasional Contributor
Posts: 6

Re: ERROR: Teradata execute: Right truncation of string data.

thanks Tom. Adding MODE=TERADATA option to the CONNECT statement worked for me.

Respected Advisor
Posts: 4,173

Re: ERROR: Teradata execute: Right truncation of string data.

The SAS Note you posted is for SAS8.2. Are you sure that the error is not simply caused by a Teradata column too short for the string you want to insert?

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 7390 views
  • 0 likes
  • 3 in conversation