SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Strange result
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

NaomiR
Starting Member

1 Posts

Posted - 03/12/2012 :  13:10:19  Show Profile  Reply with Quote
Essentially I'm having difficulty generating a numeric value with a query.

The query in its very (very!) simplest form is:

Select 5/10

Giving a result of 0

If i run:

Select 4.9/10

I get 0.49 as expected.

Can someone explain the logic of this (to a beginner).

Thanks,

Naomi

visakh16
Very Important crosS Applying yaK Herder

India
47147 Posts

Posted - 03/12/2012 :  13:15:19  Show Profile  Reply with Quote
see this

http://sqlblogcasts.com/blogs/madhivanan/archive/2008/01/16/beware-of-implicit-conversions.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000