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

Inserting 100.0 in float column gives 100. Why?

Status
Not open for further replies.

QuarkSE

Programmer
Dec 10, 2001
1
SE
Hi!

I've been trying to insert posts with floats using .0 as decimals, but SQL Server never saves the .0
How do I change this so when I insert 100.0 the post in my db will show 100.0 and not 100 as it does right now.

I've tried using float, decimal and money as types, but none of them work.

Any ideas?
 
SQL Server does know about the zero, but you have to format the output from your select statement before displaying it to the user - this is a problem for your front end program, not SQL Server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top