Reply to Re: log/log10 functions truncate my resultset

Your name:

Reply:


Posted by Erland Sommarskog on 02/25/06 01:09

BernsteinVsTheDb (Orr.Bernstein@gmail.com) writes:
> Hello all,
>
> I have a table that contains 100+ rows. I'm trying to run a query that
> looks like this:
> SELECT ..., log10(...) as Rank FROM Table
> and the resultset contains only the first row of results.
>
> SELECT ..., log10(...) as Rank FROM Table ORDER BY Rank
> returns no results at all!
>
> If you replace log10 with log, it does the same thing. However, if you
> replace log10 with abs, it returns exactly what you'd expect, all 100+
> rows.

Are all the numbers you perform log/log10 on > 0?

Do you run the query from an application or from Query Analyzer? In
the latter case, you should get an error message.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original 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

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