<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Optional parameters in Stored Procedure</title>
	<atom:link href="http://www.linglom.com/2008/09/12/optional-parameters-in-stored-procedure/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linglom.com/2008/09/12/optional-parameters-in-stored-procedure/</link>
	<description>Just another IT weblog</description>
	<lastBuildDate>Fri, 30 Jul 2010 22:18:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: linglom</title>
		<link>http://www.linglom.com/2008/09/12/optional-parameters-in-stored-procedure/comment-page-1/#comment-4302</link>
		<dc:creator>linglom</dc:creator>
		<pubDate>Wed, 20 May 2009 09:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/?p=194#comment-4302</guid>
		<description>Hi, Jonathan
Specify parameter name can solve your problem. 

For example,
EXEC [dbo].[sp_getproduct] @UnitsInStock = 20
exec usp_StoredProcA param1 = 10, param3 = 20</description>
		<content:encoded><![CDATA[<p>Hi, Jonathan<br />
Specify parameter name can solve your problem. </p>
<p>For example,<br />
EXEC [dbo].[sp_getproduct] @UnitsInStock = 20<br />
exec usp_StoredProcA param1 = 10, param3 = 20</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://www.linglom.com/2008/09/12/optional-parameters-in-stored-procedure/comment-page-1/#comment-4301</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Wed, 20 May 2009 08:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/?p=194#comment-4301</guid>
		<description>Hi,
I&#039;m having problms using optionals. I&#039;m using 3 params in my stored proc.  Param 1 is required but params 2 and 3 are optionals.  I can run my stored proc fine if I omit both params 2 and 3.  But if I omit param 2 and pass a value to param 3, SQL Server complains:
   Msg 102, Level 15, State 1, Line 1
   Incorrect syntax near &#039;,&#039;.

The syntax I used is:
   exec usp_StoredProcA param1,, param3

If I do the following:
   exec usp_StoredProcA param1, &#039;&#039;, param3

param 2 is interpreted as empty string and not the default value that I specified.

Sorry for the long email.  Hope I explained myself clearly.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;m having problms using optionals. I&#8217;m using 3 params in my stored proc.  Param 1 is required but params 2 and 3 are optionals.  I can run my stored proc fine if I omit both params 2 and 3.  But if I omit param 2 and pass a value to param 3, SQL Server complains:<br />
   Msg 102, Level 15, State 1, Line 1<br />
   Incorrect syntax near &#8216;,&#8217;.</p>
<p>The syntax I used is:<br />
   exec usp_StoredProcA param1,, param3</p>
<p>If I do the following:<br />
   exec usp_StoredProcA param1, &#8221;, param3</p>
<p>param 2 is interpreted as empty string and not the default value that I specified.</p>
<p>Sorry for the long email.  Hope I explained myself clearly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: linglom</title>
		<link>http://www.linglom.com/2008/09/12/optional-parameters-in-stored-procedure/comment-page-1/#comment-4275</link>
		<dc:creator>linglom</dc:creator>
		<pubDate>Tue, 12 May 2009 02:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/?p=194#comment-4275</guid>
		<description>Hi, Priya
The example above is to execute the store procedure without specify parameters by set default values (NULL) to the parameters.</description>
		<content:encoded><![CDATA[<p>Hi, Priya<br />
The example above is to execute the store procedure without specify parameters by set default values (NULL) to the parameters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priya</title>
		<link>http://www.linglom.com/2008/09/12/optional-parameters-in-stored-procedure/comment-page-1/#comment-4258</link>
		<dc:creator>Priya</dc:creator>
		<pubDate>Thu, 07 May 2009 09:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/?p=194#comment-4258</guid>
		<description>I cant understand with this example</description>
		<content:encoded><![CDATA[<p>I cant understand with this example</p>
]]></content:encoded>
	</item>
</channel>
</rss>
