Ram Shankar Yadav's Blog!

My life's my passion!
posts - 165, comments - 361, trackbacks - 91

My Links

News


Microsoft Certified Professional Developer (MCPD) - .NET 2.0 Enterprise Application Development



Cheap Website Hosting - Free Domain

Twitter












Archives

Post Categories

Image Galleries

Blogs that I like most !

Sites that I like most !

Problem while inserting X.00 in a float column in SQL Server

I recently faced this problem, when I tried to enter a value 2.00 in a float column in SQL Server 2000. I repeatedly tried to insert this value but I failed every time, then I tried with some work arounds by casting that value to numeric/decimal. It worked but......., there's still one thing that was missing was that when we tried with the following SQL statement:

Select Cast(fieldname as numeric(9,2)) From tablename

Although we got the desired result in that column but column name was missing this time so we tried this:

Select Cast(fieldname as numeric(9,2)) alias From tablename
or
Select Cast(fieldname as numeric(9,2)) as alias From tablename

Yo ho ! It finally worked !

Print | posted on Wednesday, January 25, 2006 7:40 AM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: