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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number Formatting Issue 1

Status
Not open for further replies.

tradle

Programmer
Joined
Jan 7, 2004
Messages
94
Location
US
All -

This is a weird one. I'm trying to concatenate 2 character strings, and then convert the concatenated result into number format. Everything that I have tried results in a scientific notation result - not an integer.

This may be very, very trivial, but I'm missing something. I've posted two of my results below...

CAST(CONCAT(BANK,COST_CENTER)ASNUMBER(14))
------------------------------------------
5.6010E+10

TO_NUMBER(CONCAT(BANK,COST_CENTER),'99999999999.')
---------------------------------------------------
5.6010E+10

Instead of the above, what I'm looking for is:

CONCAT(BANK,COS
---------------
56010001185

Thanks!
Tim
 
If you query from sql*plus you should increase NUMWIDTH or specify format mask explicitly in TO_CHAR.

Regards, Dima
 
THANK YOU DIMA!!!!!!!!!!!!!

I should have known it was an environmental setting!

Regards,
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top