FEXP or MLOAD are converting an INTEGER field in a negative BIGINT

Database

FEXP or MLOAD are converting an INTEGER field in a negative BIGINT

Hello guys, this is my first topic here.

There is a few days that i'm trying to resolve a problem and doesn't have any succeeds.

I have some INTEGER fields that i need to concatenate, so, i'm using the below formula to do that and put them in a BIGINT field (it will be my PRIMARY INDEX). I utilizes some work tables to do the job, and i got the return that i want with that.

(CASE WHEN TP_PESS = 'F' THEN 

  (STG.CPF_BASE_CLIE*100 + STG.DV_CPF_CLIE) ELSE 

(STG.CPF_BASE_CLIE*1000000+STG.FILIAL_CLIE*100+STG.DV_CPF_CLIE)

    END) AS NDOCTO_CLI

The problem starts when i use FEXP (or MLOAD, didn't sure), because the values that i've in the WRK table was transformed in a huge negative number, example below:

VALUE IN WORK TABLE: 

NDOCTO_CLI =  10,985,687,999,915 (this is the correct value)

VALUE IN TARGET TABLE:

NDOCTO_CLI = -3,600,656,854,457,253,884 (this is what the field becomes after FEXP and MLOAD runs)

I'll appreciate any help.

Thanks

Tags (2)
1 REPLY
Highlighted
Teradata Employee

Re: FEXP or MLOAD are converting an INTEGER field in a negative BIGINT

Does MLOAD define the input record correctly? What record format are you using?

Are both FEXP and MLOAD running on the same client, or did you move the file to a different hardware / OS platform?