Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integer to Number 1

Status
Not open for further replies.

sivatcs

Programmer
Nov 24, 2005
3
US
I have a table in Teradata A, column abc integer.

I wan't to load the teradata data into a oracle table B, column abc number.

Datatype width is not specified in teradata, so what width can i give for the number column.

While unloading the data from Teradata into a file if i give a query as

Select abc (format '9(10)') from A.

How should i write the query for formatting the column.
 
I am assuming you used an ODBC connection for your select statement which won't apply a format statement. CAST to character after format

Select CAST((abc (format '9(10)')) as CHAR(10)) from A
 
!!! Be carefull. Don't forget the sign.

INTEGER is a signed type, with stores values between -2147483648 and 2147483647

So, if you cast to format '9(10)', the sign could be lost.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top