You are here: Re: Can a stored procedure parameter be optional « MsSQL Server « IT news, forums, messages
Re: Can a stored procedure parameter be optional

Posted by Tom Moreau on 03/07/06 22:14

Try:

create proc MyProc
(
@parm1 int -- mandatory
, @parm2 int = 5 -- optional
)
as
....

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com

"CK" <c_kettenbach@hotmail.com> wrote in message
news:sBlPf.43261$F_3.25017@newssvr29.news.prodigy.net...
I want the procedure to check for the existence of a paramter and if it is
there, it will process these instructions, otherwise it will process these
instructions. Any ideas? Thanks for your advice.

Regards,
CK

 

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

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