One Star edv
One Star

Convert short and long numbers to Integers?

I have an access database and am moving data to a postgresql DB. Many of the fields in the access are listed as short or long. How do I convert to the Integer type in Postgresql?
Any suggestions are welcome.
Thanks.
3 REPLIES
Community Manager

Re: Convert short and long numbers to Integers?

Hello
You can convert short/long to int/integer on tMap, for example:
on the expression of output column, type in
(int)row1.columnName

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Convert short and long numbers to Integers?

Shong!!
When i want to convert form long to int in tmap..but it throws me an error..saying it cant cast from long to int
Community Manager

Re: Convert short and long numbers to Integers?

Shong!!
When i want to convert form long to int in tmap..but it throws me an error..saying it cant cast from long to int

ah, the error message should be 'it can't cast from Long to int'!, this is because Long is an object, to get around it, uncheck the 'nullable' box on schema.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business