<Error> value for a field

Database
Enthusiast

<Error> value for a field

All,

The source data contains single or double blanks, which inturn are loaded into teradata using fastload script. In teradata the filed is a not null field. Once the fastload process completes this column is populated with '' .

Is this value an internal settings of SQL assistant? If not could someone tell me what could be the reason?
3 REPLIES
Junior Contributor

Re: <Error> value for a field

"source data contains single or double blank"

What format is the source data? Binary or readable text?

What's the datatype in DEFINE? Char or Varchar?

"this column is populated with '' "

Which column/datatype? Varchar?

input:varchar & target:varchar shouldn't trim blanks, but input:char & target:varchar will.

Dieter
Enthusiast

Re: <Error> value for a field

Dieter,

In DEFINE the field is specified as CHAR and in the target table it has VARCHAR.

As you have mentioned that the blanks would be trim, is there a work around for this issue without changing the target datatype?
Junior Supporter

Re: <Error> value for a field

"In DEFINE the field is specified as CHAR and in the target table it has VARCHAR."

"is there a work around for this issue without changing the target datatype?"

RTFM:

When the DEFINE command data type attribute is CHAR(n) and the:

• CREATE TABLE datadesc attribute is CHAR(n), Teradata FastLoad stores the data in fixed-length format, entire field.

• CREATE TABLE datadesc attribute is CHAR(m), Teradata FastLoad stores the data in fixed-length format, padded if m > n, truncated if m < n.

• CREATE TABLE datadesc attribute is VARCHAR(m), Teradata FastLoad stores the data in variable-length format with blanks trimmed.

When the DEFINE command datatype attribute is VARCHAR(n) and the:

• CREATE TABLE datadesc attribute is VARCHAR(m), Teradata FastLoad stores the data in variable-length format, no padding, blanks not trimmed.

• CREATE TABLE datadesc attribute is CHAR(m), Teradata FastLoad stores the data in padded or truncated format, as required.

The first part describes your case, the second how to fix it without changing the table data type...

HTH.

Cheers.

Carlos.