Re: Simple Math Question



As you discovered, it was doing integer division -resulting in a division
result of zero [0]. Adding a [.0] to either operand makes it work.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"Phil" <Phil@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:07C74F44-C283-42E4-9F54-1DF2ED23B82F@xxxxxxxxxxxxxxxx
I have fixed this now by changing one of the figures to a Float type.

Thanks PD

"Phil" wrote:

Hi,

Hope someone can help with something so silly and that I feel quite
ashamed
about asking, I am just doing some simple percentage calcualtions which I
have done in sql before without any problems, my query simplified is as
follows

SELECT 50 /175 * 100

If you do this on a calculator you get 28.57 ignoring the trailing
figures,
if you run the above query you get ' 0 '. I am running SQL Server 2000
&
2005 and I get the same results. I am sure I am just doing something
silly
but if anyone can help it would be much appreciated.

Thanks PD


.



Relevant Pages

  • Re: Domain or Workgroup
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... to connect to a server and not being properly configured. ... installed, since better security is now available, file storage may be ...
    (microsoft.public.sqlserver.clients)
  • Re: Domain or Workgroup
    ... comments which contradict others' suggestions or material in a ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... to connect to a server and not being properly configured. ...
    (microsoft.public.sqlserver.clients)
  • Re: Domain or Workgroup
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... to connect to a server and not being properly configured. ... installed, since better security is now available, file storage may be ...
    (microsoft.public.sqlserver.clients)
  • Re: Domain or Workgroup
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... to connect to a server and not being properly configured. ... installed, since better security is now available, file storage may be ...
    (microsoft.public.sqlserver.clients)
  • Re: Linked Server Security question
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... that folder and all files in it. ... it's related somehow to the security on that linked server. ...
    (microsoft.public.sqlserver.connect)