<?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: Unable to load the table to teradata- how to fix this issue? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/606047#M175939</link>
    <description>&lt;P&gt;The message you get is probably because SAS creates the columns in Teradata by looking at the formats you have assigned to the variables. So the problem is probably with COL5 og COL6 (which SAS tries to map to DECIMAL(4,2) variables). Some of the values for one or both of these variables may be too large to fit in the format. Try changing or removing the formats before loading to Teradata, or use the DBTYPE dataset option to force a different column type, e.g.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table db.table(dbtype=(COL5='numeric(12,2)'))
as select * from mytable;  
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When bulkloading, only the rows that contain the offending values are not inserted, the whole INSERT operation is not rolled back, which is why you get too few rows in the output table. With the SQL solution, the whole statement is rolled back after encountering an error.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2019 08:40:33 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2019-11-21T08:40:33Z</dc:date>
    <item>
      <title>Unable to load the table to teradata- how to fix this issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/605985#M175907</link>
      <description>&lt;P&gt;METHOD 1-&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname hemi teradata user="&amp;amp;user." pw="&amp;amp;passwd." tdpid=***schema="*****" mode=teradata dbsliceparm=all;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* upload to generate a teradatatable*/&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;create table db.table&lt;/P&gt;&lt;P&gt;as select * from mytable;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It gives me this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Teradata insert: Numeric overflow occurred during computation. SQL statement was: USING ("Col1"&lt;BR /&gt;DATE,"Col2" FLOAT,"Col3" FLOAT,"Col4" FLOAT,"Col5"&lt;BR /&gt;DECIMAL(4,2),"Col6" DECIMAL(4,2))INSERT INTO db."table"&lt;BR /&gt;("Col1","Col2","Col3","Col4","Col5","Col6") VALUES&lt;BR /&gt;(:"Col1",:"Col2",:"Col3",:"Col4",:"Col5",:"Col6"). Insert&lt;BR /&gt;substitution values are not shown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: File deletion failed for db.table.DATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead I tried this method 2 libname below and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;METHOD 2-&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname hemi teradata user="&amp;amp;user." password="&amp;amp;passwd." tdpid="****" database=**mode=teradata bulkload=Yes fastload=yes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table is created but missing a few rows i.e. 407 instead of 412 probably because of fastload and bulkload options. How do I fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 02:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/605985#M175907</guid>
      <dc:creator>ilearnsas</dc:creator>
      <dc:date>2019-11-21T02:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to load the table to teradata- how to fix this issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/605998#M175913</link>
      <description>&lt;P&gt;1. You need to look at the values that cause the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Using proc append plus fastload is often the preferred option to this type of operation.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 03:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/605998#M175913</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-21T03:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to load the table to teradata- how to fix this issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/606047#M175939</link>
      <description>&lt;P&gt;The message you get is probably because SAS creates the columns in Teradata by looking at the formats you have assigned to the variables. So the problem is probably with COL5 og COL6 (which SAS tries to map to DECIMAL(4,2) variables). Some of the values for one or both of these variables may be too large to fit in the format. Try changing or removing the formats before loading to Teradata, or use the DBTYPE dataset option to force a different column type, e.g.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table db.table(dbtype=(COL5='numeric(12,2)'))
as select * from mytable;  
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When bulkloading, only the rows that contain the offending values are not inserted, the whole INSERT operation is not rolled back, which is why you get too few rows in the output table. With the SQL solution, the whole statement is rolled back after encountering an error.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 08:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/606047#M175939</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2019-11-21T08:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to load the table to teradata- how to fix this issue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/606158#M175983</link>
      <description>&lt;P&gt;Thank you! This worked for me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-load-the-table-to-teradata-how-to-fix-this-issue/m-p/606158#M175983</guid>
      <dc:creator>ilearnsas</dc:creator>
      <dc:date>2019-11-21T14:54:13Z</dc:date>
    </item>
  </channel>
</rss>

