You are here: Re: needed: 1 + null = 1 (Correction) « MsSQL Server « IT news, forums, messages
Re: needed: 1 + null = 1 (Correction)

Posted by info on 05/31/07 08:21

I like Chris' last idea:
COALESCE(Col1, 0) + COALESCE(Col2, 0) + COALESCE(Col3, 0) +
0*COALESCE(Col1, Col2, Col3)

This calculates the value in one expression. I expect it to perform
well, at least not much worse than without the last term.

Gert-Jan, I need some time to find out what your code does. With all
respect, it lacks the simplicity of the above solution.

Robert, it does make sense and the schema is build dynamically.

Thanks for your responses.

 

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

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