You are here: Re: Help optmizing a stored proc « MsSQL Server « IT news, forums, messages
Re: Help optmizing a stored proc

Posted by figital on 03/09/06 20:00

Just one block:

-- get list of taskorders with their respective fundingtotals as of
specified date
SELECT TO1.TaskOrderID,
FROM TaskOrder TO1
WHERE (@BillingContractID IS NULL OR TO1.BillingContractID =
@BillingContractID)
AND (@Filter IS NULL OR TO1.Retired <> @Filter)

Note this last line. If @Filter is NULL, the entire block is ALWAYS
true so "TO1.Retired <> @Filter" doesn't matter. If @filter is not
null, "TO1.Retired <> @Filter" is the part that matters.

 

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

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