<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Converting Stored Procedure into Table Valued Function</title>
	<atom:link href="http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:12:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-63561</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 12:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-63561</guid>
		<description><![CDATA[Hello Ting,

I think when used in JOIN, the TVF executed multiple times (depends on the number of records in other joined tables)while in SELECT statement, it is executed once.
So using the temporary table is better way to process its result.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Ting,</p>
<p>I think when used in JOIN, the TVF executed multiple times (depends on the number of records in other joined tables)while in SELECT statement, it is executed once.<br />
So using the temporary table is better way to process its result.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ting</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-63484</link>
		<dc:creator><![CDATA[Ting]]></dc:creator>
		<pubDate>Mon, 22 Mar 2010 18:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-63484</guid>
		<description><![CDATA[I have a question about the TVF. When performing a SELECT on the TVF, the result was return in less than a second. But when the TVF is used in a join statement, it took about 4 minutes to run! I was wondering why it&#039;s so slow when used in the JOIN?

On the other hand, if the TVF is loaded first into a temp table, then use this temp table in the JOIN, the result was under 15 seconds.]]></description>
		<content:encoded><![CDATA[<p>I have a question about the TVF. When performing a SELECT on the TVF, the result was return in less than a second. But when the TVF is used in a join statement, it took about 4 minutes to run! I was wondering why it&#8217;s so slow when used in the JOIN?</p>
<p>On the other hand, if the TVF is loaded first into a temp table, then use this temp table in the JOIN, the result was under 15 seconds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AZ</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-60706</link>
		<dc:creator><![CDATA[AZ]]></dc:creator>
		<pubDate>Fri, 05 Feb 2010 11:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-60706</guid>
		<description><![CDATA[Hello! Could you give me a link to the original article about converting a stored procedure into a table valued function? I can&#039;t find any obvious links to it from this page...
Thank you!]]></description>
		<content:encoded><![CDATA[<p>Hello! Could you give me a link to the original article about converting a stored procedure into a table valued function? I can&#8217;t find any obvious links to it from this page&#8230;<br />
Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sanjay</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-57794</link>
		<dc:creator><![CDATA[sanjay]]></dc:creator>
		<pubDate>Sun, 22 Nov 2009 06:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-57794</guid>
		<description><![CDATA[Thanx :)]]></description>
		<content:encoded><![CDATA[<p>Thanx :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RH</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-56741</link>
		<dc:creator><![CDATA[RH]]></dc:creator>
		<pubDate>Thu, 15 Oct 2009 22:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-56741</guid>
		<description><![CDATA[You said &quot;Moreover, if the SP has DML statements such as DELETE, UPDATE, INSERT or MERGE, it cannot be converted to a TVF. The usage of TVF is limited to the SELECT statement only.&quot;

That is true of an in-line TVF, but not true of a multi-statement TVF.  If you could not INSERT into the table defined in the return of a multi-statement TVF there would not be anything to RETURN.

It would be correct if you added the exception stated in Books Online, &quot;except to table variables&quot;.]]></description>
		<content:encoded><![CDATA[<p>You said &#8220;Moreover, if the SP has DML statements such as DELETE, UPDATE, INSERT or MERGE, it cannot be converted to a TVF. The usage of TVF is limited to the SELECT statement only.&#8221;</p>
<p>That is true of an in-line TVF, but not true of a multi-statement TVF.  If you could not INSERT into the table defined in the return of a multi-statement TVF there would not be anything to RETURN.</p>
<p>It would be correct if you added the exception stated in Books Online, &#8220;except to table variables&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammed Ismail</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-56573</link>
		<dc:creator><![CDATA[Muhammed Ismail]]></dc:creator>
		<pubDate>Sat, 10 Oct 2009 08:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-56573</guid>
		<description><![CDATA[how to insert data in two tables to use one Store Procedure]]></description>
		<content:encoded><![CDATA[<p>how to insert data in two tables to use one Store Procedure</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-55956</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Thu, 17 Sep 2009 17:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-55956</guid>
		<description><![CDATA[Sure,

I am reposting my original article in a day or so, as I found something new in regards to that article.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Sure,</p>
<p>I am reposting my original article in a day or so, as I found something new in regards to that article.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 8kb</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-55955</link>
		<dc:creator><![CDATA[8kb]]></dc:creator>
		<pubDate>Thu, 17 Sep 2009 17:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-55955</guid>
		<description><![CDATA[Hi Pinal,

Can you provide a link to the original article about converting stored procedures to TMVs?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Can you provide a link to the original article about converting stored procedures to TMVs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ritesh Shah</title>
		<link>http://blog.sqlauthority.com/2009/09/17/sql-server-converting-stored-procedure-into-table-valued-function/#comment-55934</link>
		<dc:creator><![CDATA[Ritesh Shah]]></dc:creator>
		<pubDate>Thu, 17 Sep 2009 07:09:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6798#comment-55934</guid>
		<description><![CDATA[Well, this is indeed a good discussion. according to me, if we are having just one SELECT statement which is returning one result sets than it would be good to convert it into TVF because we can join that result set to other SELECT statement. 

while using SP, you can&#039;t join it with anything else directly.]]></description>
		<content:encoded><![CDATA[<p>Well, this is indeed a good discussion. according to me, if we are having just one SELECT statement which is returning one result sets than it would be good to convert it into TVF because we can join that result set to other SELECT statement. </p>
<p>while using SP, you can&#8217;t join it with anything else directly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

