Loading space into a Decimal(15,2) column
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Loading space into a Decimal(15,2) column Expand / Collapse
Author
Message
Posted 9/5/2006 2:05:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/2/2006 1:40:00 AM
Posts: 3, Visits: 1
Hi,

We are facing issues in loading a text file from a Mainframe system to Teradata database using Mulitload. Here are the details.

Problem Description :
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.


File Format : Text
Source Field datatype : Packed decimal (cobol comp3)
Target TD Column datatype : Decimal(15,2)
Error Message : 2679 The format or data contains a bad character


Has anyone encountered this problem before.

Please let me know your comments/suggestions.

With Regards,
Anand











Post #5054
Posted 9/5/2006 12:21:53 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 10/7/2008 12:54:51 PM
Posts: 116, Visits: 20
Anand,
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.



Feroz Shaik
Post #5057
Posted 9/7/2006 12:18:20 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/2/2006 1:40:00 AM
Posts: 3, Visits: 1
Thanks Feroz,

We already tried using CAST also we tried using NULLIF to replace spaces with NULL. The same behaviour is seen
Post #5074
Posted 9/14/2006 9:25:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/3/2006 9:40:00 AM
Posts: 3, Visits: 1
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.

Dave
Post #5144
Posted 1/23/2007 9:07:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/14/2007 2:28:00 AM
Posts: 7, Visits: 1
If I am correctly understanding the problem, then I think you should try using TRIM Leading or Trailing or both

      _________
  /   Regards,    \
/____________\
 |  Raghav   |
 |___________|

 

Post #6396
Posted 1/23/2007 12:15:26 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: PAC and SFT Members
Last Login: Today @ 1:10:32 AM
Posts: 312, Visits: 430
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?

.FIELD MyFldC 99 CHAR(8);
.FIELD MyFldPD 99 DECIMAL(15,2) NULLIF MyFldC = ' ';
...
INSERT ... VALUES(... :MyFldPD ...);
Post #6397
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 2:04am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 7 queries. Compression Disabled.