<?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"
	>
<channel>
	<title>Comments on: EXEC &#38; EXEC sp_executesql</title>
	<atom:link href="http://michaelsync.net/2006/07/04/exec-exec-sp_executesql/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql</link>
	<description>Sharing our knowledge</description>
	<pubDate>Sun, 20 Jul 2008 15:57:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Nuno Nogueira</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-14762</link>
		<dc:creator>Nuno Nogueira</dc:creator>
		<pubDate>Wed, 28 Nov 2007 09:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-14762</guid>
		<description>hi,

the &#62;&#62; it's to mark the example i see.
that example doesn't work, at least for me... 

either way, i change the sp_executesql to exec only, and it's working. With exec() i dont have the 4000 limit characters.
something like

declare @strSql1 nvarchar(4000)
declare @strSql2 nvarchar(4000)
declare @strSql3 nvarchar(4000)

exec (@strSql1 + @strSql2 + @strSql3)

thx! anyway</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>the &gt;&gt; it&#8217;s to mark the example i see.<br />
that example doesn&#8217;t work, at least for me&#8230; </p>
<p>either way, i change the sp_executesql to exec only, and it&#8217;s working. With exec() i dont have the 4000 limit characters.<br />
something like</p>
<p>declare @strSql1 nvarchar(4000)<br />
declare @strSql2 nvarchar(4000)<br />
declare @strSql3 nvarchar(4000)</p>
<p>exec (@strSql1 + @strSql2 + @strSql3)</p>
<p>thx! anyway</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-14658</link>
		<dc:creator>Michael Sync</dc:creator>
		<pubDate>Wed, 28 Nov 2007 02:21:09 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-14658</guid>
		<description>Hi Nuno,

It works or doesn't work?? I'm not clear what you are saying... What did you do with a lot of "&gt;&gt;" ??</description>
		<content:encoded><![CDATA[<p>Hi Nuno,</p>
<p>It works or doesn&#8217;t work?? I&#8217;m not clear what you are saying&#8230; What did you do with a lot of &#8220;>>&#8221; ??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Nogueira</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-14535</link>
		<dc:creator>Nuno Nogueira</dc:creator>
		<pubDate>Tue, 27 Nov 2007 17:14:26 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-14535</guid>
		<description>Hi,

i have a sqlServer 2000 and i want to use exec with sp_executesql 
butt i have more than 4000c.

I search  and see:
&#62;&#62;EXEC('EXEC sp_executesql N''' + @sql1 + @sql2 + ''',
&#62;&#62;                         N''@state char(2)'',
&#62;&#62;                         @state = ''' + @state + '''')
&#62;&#62;This works, because the @stmt parameter to sp_executesql is &#62;&#62;ntext, so by itself, it does not have any limitation in size.


but doesn't work... :&#124; 
any ideia?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i have a sqlServer 2000 and i want to use exec with sp_executesql<br />
butt i have more than 4000c.</p>
<p>I search  and see:<br />
&gt;&gt;EXEC(&#8217;EXEC sp_executesql N&#8221;&#8217; + @sql1 + @sql2 + &#8221;&#8217;,<br />
&gt;&gt;                         N&#8221;@state char(2)&#8221;,<br />
&gt;&gt;                         @state = &#8221;&#8217; + @state + &#8221;&#8221;)<br />
&gt;&gt;This works, because the @stmt parameter to sp_executesql is &gt;&gt;ntext, so by itself, it does not have any limitation in size.</p>
<p>but doesn&#8217;t work&#8230; <img src='http://michaelsync.net/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /><br />
any ideia?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-428</link>
		<dc:creator>Michael Sync</dc:creator>
		<pubDate>Thu, 05 Apr 2007 02:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-428</guid>
		<description>Your are very welcome. Joaquin. :)</description>
		<content:encoded><![CDATA[<p>Your are very welcome. Joaquin. <img src='http://michaelsync.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joaquin Quiros</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-427</link>
		<dc:creator>Joaquin Quiros</dc:creator>
		<pubDate>Wed, 04 Apr 2007 23:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-427</guid>
		<description>You saved my head today with this tip.
Thanx a lot!!!
:)</description>
		<content:encoded><![CDATA[<p>You saved my head today with this tip.<br />
Thanx a lot!!! <img src='http://michaelsync.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-426</link>
		<dc:creator>Michael Sync</dc:creator>
		<pubDate>Thu, 05 Oct 2006 15:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-426</guid>
		<description>Thanks..  Acto.</description>
		<content:encoded><![CDATA[<p>Thanks..  Acto.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Acto</title>
		<link>http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-425</link>
		<dc:creator>Acto</dc:creator>
		<pubDate>Thu, 05 Oct 2006 15:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2006/07/04/exec-exec-sp_executesql#comment-425</guid>
		<description>Tip: Use NVARCHAR(MAX) in MS SQLserver 2005 - works like a charm</description>
		<content:encoded><![CDATA[<p>Tip: Use NVARCHAR(MAX) in MS SQLserver 2005 - works like a charm</p>
]]></content:encoded>
	</item>
</channel>
</rss>
