<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ERROR: Teradata row not delivered (trget): Right truncation of string data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978183#M378584</link>
    <description>&lt;P&gt;If you are querying data that is using a single byte encoding (such as LATIN1) and running SAS using UTF-8 encoding then some characters could go from using one byte to using two or more bytes.&amp;nbsp; Which could cause the same string of bytes to grow in length.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the different SAS sessions using for the value of the SAS system option ENCODING?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can run this simple statement to see the setting in the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(getoption(encoding));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Oct 2025 15:42:37 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-10-31T15:42:37Z</dc:date>
    <item>
      <title>ERROR: Teradata row not delivered (trget): Right truncation of string data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978168#M378582</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running code like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname rx teradata server="abc5xyz.teradata.company.com.au" authdomain = "Teradata Auth" schema=rx /* mode=Teradata */;
proc sql;
	create table test as
		SELECT my_column
		FROM rx.tera_table
	;
quit;
libname rx clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If not using mode=Teradata in the libname, I'm receiving below error.&amp;nbsp;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;ERROR: Teradata row not delivered (trget): Right truncation of string data.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But... Some (not all) other users can execute the exactly same code in the same environment and without mode=Teradata without receiving an Error - both via batch and EG. The only real differences between these users I can think are Teradata permissions ...but that doesn't really make sense to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas or experience what could be happening here?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Cheers, Patrick&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 06:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978168#M378582</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2025-10-31T06:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Teradata row not delivered (trget): Right truncation of string data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978172#M378583</link>
      <description>&lt;P&gt;Agree that permission doesn't make sense, unless you are using row-level permissions.&lt;/P&gt;
&lt;P&gt;Assumed you have tried tracing to get more information out?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace="d,,,ds" sastraceloc=saslog nostsuffix msglevel=i;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Oct 2025 08:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978172#M378583</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2025-10-31T08:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Teradata row not delivered (trget): Right truncation of string data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978183#M378584</link>
      <description>&lt;P&gt;If you are querying data that is using a single byte encoding (such as LATIN1) and running SAS using UTF-8 encoding then some characters could go from using one byte to using two or more bytes.&amp;nbsp; Which could cause the same string of bytes to grow in length.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the different SAS sessions using for the value of the SAS system option ENCODING?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can run this simple statement to see the setting in the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(getoption(encoding));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 15:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978183#M378584</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-10-31T15:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Teradata row not delivered (trget): Right truncation of string data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978212#M378587</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, Teradata is on Unicode and SAS on LATIN1 which is the root cause for the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe I figured out what the issue is (have to fully verify next week when back at work):&lt;/P&gt;
&lt;P&gt;The SAS SQL accesses a Teradata View that sources from another Teradata view. I can only access the first (last in the chain) view.&lt;/P&gt;
&lt;P&gt;Data protection has lately been tightened and I've realised that the account_id's I'm getting are masked (hex string).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The users (user id's) that still can execute the SAS script without mode=Teradata are used for production runs and certainly need clear-text data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess is that these users got additional/different Teradata permissions and that the Teradata view defines the account_id column with a different definition (=likely not as Unicode) for these users.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 23:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978212#M378587</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2025-10-31T23:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Teradata row not delivered (trget): Right truncation of string data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978213#M378588</link>
      <description>My advice — even if others aren’t hitting it, it could be due to differences in default string lengths or client-side SAS settings. Try explicitly setting the length for my_column in your proc sql query, e.g.,&lt;BR /&gt;&lt;BR /&gt;select cast(my_column as varchar(1000)) as my_column</description>
      <pubDate>Sat, 01 Nov 2025 11:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Teradata-row-not-delivered-trget-Right-truncation-of/m-p/978213#M378588</guid>
      <dc:creator>Yough1967</dc:creator>
      <dc:date>2025-11-01T11:04:22Z</dc:date>
    </item>
  </channel>
</rss>

