Need to insert 39 digit integer value in teradata

Database
Enthusiast

Need to insert 39 digit integer value in teradata

I need to insert 39 digit integer value into Teradata ,can anyone suggest me which data type will be suitable for this .

Value will be like this and generated by MD5 in oracle : 146143590553820666260695169974384723293

can any one suggest me how can i insert this value into teradata database .

please help me its urgent
5 REPLIES
Senior Apprentice

Re: Need to insert 39 digit integer value in teradata

There's a 128-bit decimal in Teradata, but it's precision is 38 digits.

MD5 usually returns a 128 bit hex value, but no integer, so you better use BYTE(16) to store it.

Dieter
Enthusiast

Re: Need to insert 39 digit integer value in teradata

i tried with this
id byte(16)
)

insert into D9_STG_GWA.Smpl values (245897415178077719586663693772824060732)

but it is throwing me an error "too many digits in integer or decimal" . please suggest me
Enthusiast

Re: Need to insert 39 digit integer value in teradata

create table d9_stg_gwa.smpl(
id byte(16)
)

insert into D9_STG_GWA.Smpl values (245897415178077719586663693772824060732)
Senior Apprentice

Re: Need to insert 39 digit integer value in teradata

You can't insert an integer into a BYTE column, you need binary data, i.e. your MD5 function should return BYTE(16).

INSERT INTO Smpl VALUES ('79B69E37F3713C6E6D27DAA6E6E278DD'xb)

Dieter
Enthusiast

Re: Need to insert 39 digit integer value in teradata

its not working for me