<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx</link><description>Peter van Ooijen over at CodeBetter.com posted in his blog about some observations he had when working with stored procedures in a recent project . What I found to be interesting about his post was his comment that a stored procedure can be, "a view with</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx#1311</link><pubDate>Fri, 25 May 2007 13:35:37 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:1311</guid><dc:creator>Jamie Thomson</dc:creator><description>&lt;p&gt;Adam,&lt;/p&gt;
&lt;p&gt;As I have mentioned to you before, I love this blog post. Whenever I am arguing with someone about the use of sprocs I just point them staight at this and pretty soon they are building UDFs.&lt;/p&gt;
&lt;p&gt;Just wanna say thanks (again) for writing this.&lt;/p&gt;
&lt;p&gt;-Jamie&lt;/p&gt;
</description></item><item><title>re: Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx#10233</link><pubDate>Tue, 02 Dec 2008 16:05:37 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:10233</guid><dc:creator>Gideon Kahl</dc:creator><description>&lt;p&gt;Thanks a lot. &amp;nbsp;I've been trying to solve a SSIS problem the whole day, and this has solved it. &amp;nbsp;I've changed my stored proc to a function and now things are working.&lt;/p&gt;
&lt;p&gt;(I am just confused why in other SSIS packages the stored procs worked...)&lt;/p&gt;
</description></item><item><title>re: Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx#11119</link><pubDate>Wed, 14 Jan 2009 20:08:52 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11119</guid><dc:creator>Max</dc:creator><description>&lt;p&gt;Hi Adam,&lt;/p&gt;
&lt;p&gt;I have to agree with you that UDFs are a better solution for the OUTPUT contract. But, I'd like to mention that this &amp;nbsp;kind of discussion always opens that can of worms: should you or should you not use SPs? That's where the discussion goes retarded(no, not parochial, retarded). Working with big databases will always force you to use SPs, but once you agreed that SPs are wrong...&lt;/p&gt;
&lt;p&gt;Max&lt;/p&gt;
</description></item><item><title>re: Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx#15110</link><pubDate>Mon, 06 Jul 2009 18:54:53 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:15110</guid><dc:creator>An Phu</dc:creator><description>&lt;p&gt;TVF should always be used if you are simply reading from tables (and not doing inserts, deletes, updates). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are other advantages with TVF: &amp;nbsp;Avoiding code duplication and minimizing network traffic.&lt;/p&gt;
&lt;p&gt;Take for example, you have two apps, app1 and app2. &amp;nbsp;Both apps queries against the same table but app1 only needs columns 1-5; app2 needs columns 2, 3 and 6-10.&lt;/p&gt;
&lt;p&gt;With SPs, you either have to either write two SP that does essentially the same thing but select different columns or modify the SP signature and add conditional logic to format the output.&lt;/p&gt;
&lt;p&gt;For each app, you can simply select the columns you need from the TVF. &amp;nbsp;The TVF will return only the columns you want. &amp;nbsp;No code duplication, no extra columns/row returned.&lt;/p&gt;
</description></item><item><title>re: Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx#22670</link><pubDate>Mon, 01 Mar 2010 11:51:55 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22670</guid><dc:creator>Stephen Hand</dc:creator><description>&lt;p&gt;Thanks, I was thinking this was the case but your post summed it all up nice and clearly.&lt;/p&gt;
&lt;p&gt;Just to throw this in, as of SQL Server 2005 I think INFORMATION_SCHEMA.ROUTINE_COLUMNS contains info about all the columns returned in TVFs.&lt;/p&gt;
</description></item><item><title>re: Stored procedures are not parameterized views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2006/07/12/stored-procedures-are-not-parameterized-views.aspx#38765</link><pubDate>Wed, 28 Sep 2011 13:14:06 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38765</guid><dc:creator>Jason Yousef</dc:creator><description>&lt;p&gt;Thanks for writing this, helped me one day and today I referred someone to it to fix his problem.&lt;/p&gt;
</description></item></channel></rss>