Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

SQL Server - convert large number to string problem

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Am using oracle sqlserver express 2005. One of my table columns contains the numeric value 1878388.
When i try convert this value to a string (in my SQL statement) using the below function i get the result of "1.87839e+006"

CONVERT(VARCHAR(30), ROUND(TSGCustomer.income/1024,3) )

"1.87839e+006" is the scientific notation, I would it to return the non scientific value of 1878388, but as a string/varchar

Any help/advice would be great.
Thanks, Ronan.
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is a JDBC application, you can return it as a number and read it using getLong(). Otherwise, have you tried the to_char() function?
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic