You are here: Re: How to calculate the midpoint « MsSQL Server « IT news, forums, messages
Re: How to calculate the midpoint

Posted by Hugo Kornelis on 11/07/07 22:27

On Wed, 07 Nov 2007 06:48:09 -0800, amj1020 wrote:

>I have three fields date, low, high. I need to calculate the midpoint
>of low and high and display it.

Hi amj1020,

SELECT "date", (low + high) / 2.0 AS midpoint
FROM YourTable;

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

 

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

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