Error with Fastload

Tools

Error with Fastload

I'm trying to simply insert a 9 digit account id from a flat file into a table. I've set up my flat file so that it simply has one record that consists of only the a sample 9 digit account id and no other characters or blanks after the account id.

I keep getting the following error message:
The length of: ACCOUNT_ID in row: 1 was greater thandefined.Defined: 9, Received: 12594

Any recommendations? Here is the code:

sessions 2;
errlimit 100;
logon db/user1,pwd01;
set record vartext;
DROP TABLE static;

CREATE TABLE static (
account_id char(9)
);

set record unformatted;

define
account_id (varchar(9))
file=static.input;
show;
begin loading static errorfiles errors_2, errors_1;
insert into static (
:account_id
);
end loading;

logoff;
2 REPLIES
Teradata Employee

Re: Error with Fastload

did you include a new-line at the end of the single record? In other words:

12345
Enthusiast

Re: Error with Fastload

define
account_id (varchar(9))
file=static.input;
show;
begin loading static errorfiles errors_2, errors_1;
insert into static (
:account_id
);

hi

this is depend upon whcih OS u r going to execute the script.if it is windows or unix it should char in the define statement.

so

define
account_id (char(9))

and the flat file input value should be 9 character .

if it is mainframe env i am not sure plx check it