You are here: Re: 3 / 2=1? Strange result in expression...HELP! « MsSQL Server « IT news, forums, messages
Re: 3 / 2=1? Strange result in expression...HELP!

Posted by MC on 10/29/06 18:04

Try converting one of the values to decimal. For example:
select 3/2 results in 1 BUT
select 3/2. should result in 1.5

Difference is in datatypes...

MC


"Rico" <you@me.com> wrote in message news:BP51h.34135$P7.18677@edtnps90...
> Hi Folks!
>
> I have a strange thing happening; I have a field that Counts the number of
> records and another field that shows the number of clients
> (Count(RecordID)=3 and NoOfClients=2) When I do a simple expression
> "Count(RecordID)/NoOfClients" the expected result should be 1.5. Instead
> the result I get is 1. Any ideas?
>
> Thanks!
> Rick
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация