﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Tools and Utilities  / Loading space into a Decimal(15,2) column / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Thu, 04 Dec 2008 01:27:41 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Loading space into a Decimal(15,2) column</title><link>http://www.teradata.com/teradataforum/Topic5054-10-1.aspx</link><description>You can't use NULLIF function in SQL because that won't be evaluated until after the bad data has been sent to Teradata. Did you try using MLOAD NULLIF processing on the client side, something like this?&lt;br&gt;&lt;br&gt;.FIELD MyFldC 99 CHAR(8);&lt;br&gt;.FIELD MyFldPD 99 DECIMAL(15,2) NULLIF MyFldC = '        ';&lt;br&gt;...&lt;br&gt;INSERT ... VALUES(... :MyFldPD ...);</description><pubDate>Tue, 23 Jan 2007 12:15:26 GMT</pubDate><dc:creator>Fred Pluebell</dc:creator></item><item><title>RE: Loading space into a Decimal(15,2) column</title><link>http://www.teradata.com/teradataforum/Topic5054-10-1.aspx</link><description>If I am correctly understanding the problem, then I think you should try using TRIM Leading or Trailing or both</description><pubDate>Tue, 23 Jan 2007 09:07:32 GMT</pubDate><dc:creator>dwhraghav</dc:creator></item><item><title>RE: Loading space into a Decimal(15,2) column</title><link>http://www.teradata.com/teradataforum/Topic5054-10-1.aspx</link><description>If all spaces is the only invalid value????   I would think you could define the the input area as both char and decimal.   Then use a case statement to check for spaces in the char name and set the target to null or zero if space and otherwise to the decimal column name. </description><pubDate>Thu, 14 Sep 2006 09:25:08 GMT</pubDate><dc:creator>dmac</dc:creator></item><item><title>RE: Loading space into a Decimal(15,2) column</title><link>http://www.teradata.com/teradataforum/Topic5054-10-1.aspx</link><description>Thanks Feroz,&lt;br&gt;&lt;br&gt;We already tried using CAST also we tried using NULLIF to replace spaces with NULL. The same behaviour is seen</description><pubDate>Thu, 07 Sep 2006 00:18:20 GMT</pubDate><dc:creator>Anand JP</dc:creator></item><item><title>RE: Loading space into a Decimal(15,2) column</title><link>http://www.teradata.com/teradataforum/Topic5054-10-1.aspx</link><description>Anand,&lt;br&gt;Could you add a case statement in the Mload to check for space in the source file and the load only the valid decimal values.&lt;br&gt;&lt;br&gt;</description><pubDate>Tue, 05 Sep 2006 12:21:53 GMT</pubDate><dc:creator>feroz_shaik</dc:creator></item><item><title>Loading space into a Decimal(15,2) column</title><link>http://www.teradata.com/teradataforum/Topic5054-10-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;We are facing issues in loading a text file from a Mainframe system to Teradata database using Mulitload. Here are the details.&lt;br&gt;&lt;br&gt;Problem Description    :&lt;br&gt;In the text file that we are loading most of the records has "spaces" instead of packed decimal values for the column/field for which the error is being reported. Mulitload loads the records having columns with proper packed decimal values but rejects records which has spaces with error code 2679.&lt;br&gt;&lt;br&gt;&lt;br&gt;File Format               : Text&lt;br&gt;Source Field datatype     : Packed decimal (cobol comp3)&lt;br&gt;Target TD Column datatype : Decimal(15,2)&lt;br&gt;Error Message             : 2679 The format or data contains a bad character&lt;br&gt;&lt;br&gt;&lt;br&gt;Has anyone encountered this problem before. &lt;br&gt;&lt;br&gt;Please let me know your comments/suggestions.&lt;br&gt;&lt;br&gt;With Regards,&lt;br&gt;Anand&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description><pubDate>Tue, 05 Sep 2006 02:05:19 GMT</pubDate><dc:creator>Anand JP</dc:creator></item></channel></rss>