<?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/"
	
	>
<channel>
	<title>
	Comments on: Stored Procedures with SSRS? Hmm… not so much	</title>
	<atom:link href="https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/feed/" rel="self" type="application/rss+xml" />
	<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/</link>
	<description></description>
	<lastBuildDate>Fri, 27 Apr 2012 16:11:28 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Piers7		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2058</link>

		<dc:creator><![CDATA[Piers7]]></dc:creator>
		<pubDate>Fri, 27 Apr 2012 16:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2058</guid>

					<description><![CDATA[In similar vein, SSIS likes to use SET Rowcount 1 to get its metadata... or poison the plan cache, depending on how it feels. &lt;a href=&quot;http://piers7.blogspot.com.au/2009/06/nasty-ssis-2008-issue-with-table-or.html&quot; rel=&quot;nofollow ugc&quot;&gt;http://piers7.blogspot.com.au/2009/06/nasty-ssis-2008-issue-with-table-or.html&lt;/a&gt;.]]></description>
			<content:encoded><![CDATA[<p>In similar vein, SSIS likes to use SET Rowcount 1 to get its metadata&#8230; or poison the plan cache, depending on how it feels. <a href="http://piers7.blogspot.com.au/2009/06/nasty-ssis-2008-issue-with-table-or.html" rel="nofollow ugc">http://piers7.blogspot.com.au/2009/06/nasty-ssis-2008-issue-with-table-or.html</a>.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chuck Desmarais		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2057</link>

		<dc:creator><![CDATA[Chuck Desmarais]]></dc:creator>
		<pubDate>Mon, 28 Nov 2011 22:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2057</guid>

					<description><![CDATA[FMT_ONLY is the problem, and SSRS should either get rid of it or make it optional. &#160;However one workaround that I find prettier is to put a dummy select at the beginning of the proc. &#160;IF 1=2 SELECT Null as [Column1], Null as [Column2]...etc. &#160;It will never get called but trick FMT_ONLY into thinking it knows the return values.]]></description>
			<content:encoded><![CDATA[<p>FMT_ONLY is the problem, and SSRS should either get rid of it or make it optional. &nbsp;However one workaround that I find prettier is to put a dummy select at the beginning of the proc. &nbsp;IF 1=2 SELECT Null as [Column1], Null as [Column2]&#8230;etc. &nbsp;It will never get called but trick FMT_ONLY into thinking it knows the return values.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jonmcrawford		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2056</link>

		<dc:creator><![CDATA[jonmcrawford]]></dc:creator>
		<pubDate>Mon, 28 Nov 2011 18:30:34 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2056</guid>

					<description><![CDATA[I would disagree with you Rob, only because I don&#039;t think that a function should be used (conceptually) to return a resultset, it should be mapping input to output. While that *may* be the case, it also might not be for these reporting situations, where you might have no input at all, you might have input of a date range and return a huge dataset, etc. I do see your point about the multiple results returned from FMTONLY, and the validation in the WHERE is a definite improvement.]]></description>
			<content:encoded><![CDATA[<p>I would disagree with you Rob, only because I don&#8217;t think that a function should be used (conceptually) to return a resultset, it should be mapping input to output. While that *may* be the case, it also might not be for these reporting situations, where you might have no input at all, you might have input of a date range and return a huge dataset, etc. I do see your point about the multiple results returned from FMTONLY, and the validation in the WHERE is a definite improvement.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alexander Kuznetsov		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2055</link>

		<dc:creator><![CDATA[Alexander Kuznetsov]]></dc:creator>
		<pubDate>Mon, 28 Nov 2011 05:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2055</guid>

					<description><![CDATA[You are suggesting a reasonable workaround, of course, but would it not be better to fix the root cause? FMT_ONLY should be deprecated, as it leads to issues like the one you described. Instead of using it, SSRS should allow us to execute whatever we want and let us specify the parameters we want to call it with.
I ran into a similar issue when I was dragging a stored procedure onto Linq pad. The procedure was storing intermediate results in a temp table, and FMT_ONLY choked on it. So I wrote my own little tool to replace the one that comes with VS 2010 - it just works, and it took me like half an hour to develop. Instead of using the unreliable FMT_ONLY, I just use a string to get the parameters to invoke the module with - it is that easy to get it right.]]></description>
			<content:encoded><![CDATA[<p>You are suggesting a reasonable workaround, of course, but would it not be better to fix the root cause? FMT_ONLY should be deprecated, as it leads to issues like the one you described. Instead of using it, SSRS should allow us to execute whatever we want and let us specify the parameters we want to call it with.<br />
I ran into a similar issue when I was dragging a stored procedure onto Linq pad. The procedure was storing intermediate results in a temp table, and FMT_ONLY choked on it. So I wrote my own little tool to replace the one that comes with VS 2010 &#8211; it just works, and it took me like half an hour to develop. Instead of using the unreliable FMT_ONLY, I just use a string to get the parameters to invoke the module with &#8211; it is that easy to get it right.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dragan Babovic		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2054</link>

		<dc:creator><![CDATA[Dragan Babovic]]></dc:creator>
		<pubDate>Sat, 26 Nov 2011 20:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2054</guid>

					<description><![CDATA[The valid point has been made at the end of the article. Inline UDF should be the first choice whenever possible including reports. But saying always use UDF is wrong as well. There is no tool that is the best choice in every situation. So &#034;Everything in...&#034; is really a bad way to begin the sentence. Stored procedures have their place but should not be used always, nor should UDFs. I&#039;ve seen many complex reports where sprocs were the only choice.
It is a shame that the author didn&#039;t use raiserror rather than the select statement in his example for handling &#160;error conditions. After all raiserror is meant to be used for well, raising errors. &#160;The point would be equally valid.]]></description>
			<content:encoded><![CDATA[<p>The valid point has been made at the end of the article. Inline UDF should be the first choice whenever possible including reports. But saying always use UDF is wrong as well. There is no tool that is the best choice in every situation. So &quot;Everything in&#8230;&quot; is really a bad way to begin the sentence. Stored procedures have their place but should not be used always, nor should UDFs. I&#8217;ve seen many complex reports where sprocs were the only choice.<br />
It is a shame that the author didn&#8217;t use raiserror rather than the select statement in his example for handling &nbsp;error conditions. After all raiserror is meant to be used for well, raising errors. &nbsp;The point would be equally valid.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg Low		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2053</link>

		<dc:creator><![CDATA[Greg Low]]></dc:creator>
		<pubDate>Fri, 25 Nov 2011 07:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2053</guid>

					<description><![CDATA[Hi Rob,
What I like to see is that a database object is called from RS. I don&#039;t care what type of object it is. I prefer sprocs though. My main interest is that I don&#039;t want embedded T-SQL in reports. Every time code gets embedded somewhere outside the database, another minefield is left for anyone that ever needs to refactor or work on the database, as they have no visibility on the code being executed.
I do often get frustrated with some of the limitations of the SQL Server datasources in RS and I often wish I could find the query option that says &#034;just run with me on this&#034; when it wants to have a parsing whinge. Most of those issues I can get around by using an OLEDB datasource instead of a SQL Server one.]]></description>
			<content:encoded><![CDATA[<p>Hi Rob,<br />
What I like to see is that a database object is called from RS. I don&#8217;t care what type of object it is. I prefer sprocs though. My main interest is that I don&#8217;t want embedded T-SQL in reports. Every time code gets embedded somewhere outside the database, another minefield is left for anyone that ever needs to refactor or work on the database, as they have no visibility on the code being executed.<br />
I do often get frustrated with some of the limitations of the SQL Server datasources in RS and I often wish I could find the query option that says &quot;just run with me on this&quot; when it wants to have a parsing whinge. Most of those issues I can get around by using an OLEDB datasource instead of a SQL Server one.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrew Tobin		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2052</link>

		<dc:creator><![CDATA[Andrew Tobin]]></dc:creator>
		<pubDate>Fri, 25 Nov 2011 04:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2052</guid>

					<description><![CDATA[I do have some good news though, they&#039;re considering Multiple sets returned for 2008.
Oh.
&lt;a href=&quot;http://connect.microsoft.com/SQLServer/feedback/details/308493/allow-multiple-datasets-in-one-reporting-service-sql-query&quot; rel=&quot;nofollow ugc&quot;&gt;http://connect.microsoft.com/SQLServer/feedback/details/308493/allow-multiple-datasets-in-one-reporting-service-sql-query&lt;/a&gt;
(A connect request I put in in 2007 asking for it to be considered ;))]]></description>
			<content:encoded><![CDATA[<p>I do have some good news though, they&#8217;re considering Multiple sets returned for 2008.<br />
Oh.<br />
<a href="http://connect.microsoft.com/SQLServer/feedback/details/308493/allow-multiple-datasets-in-one-reporting-service-sql-query" rel="nofollow ugc">http://connect.microsoft.com/SQLServer/feedback/details/308493/allow-multiple-datasets-in-one-reporting-service-sql-query</a><br />
(A connect request I put in in 2007 asking for it to be considered ;))</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rob Farley		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2051</link>

		<dc:creator><![CDATA[Rob Farley]]></dc:creator>
		<pubDate>Tue, 22 Nov 2011 12:54:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2051</guid>

					<description><![CDATA[Hi Boyan,
Yes, I wouldn&#039;t be recommending joining functions to other functions.
Using TVFs instead of procedures can be really neat. Extra columns can be added without breaking reports, and using the principles shown in &lt;a href=&quot;http://bit.ly/SimpleRob&quot; rel=&quot;nofollow ugc&quot;&gt;http://bit.ly/SimpleRob&lt;/a&gt;, you can make joins redundant and far better performance than less-than-ideal procedures.
Rob]]></description>
			<content:encoded><![CDATA[<p>Hi Boyan,<br />
Yes, I wouldn&#8217;t be recommending joining functions to other functions.<br />
Using TVFs instead of procedures can be really neat. Extra columns can be added without breaking reports, and using the principles shown in <a href="http://bit.ly/SimpleRob" rel="nofollow ugc">http://bit.ly/SimpleRob</a>, you can make joins redundant and far better performance than less-than-ideal procedures.<br />
Rob</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Boyan Penev		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2050</link>

		<dc:creator><![CDATA[Boyan Penev]]></dc:creator>
		<pubDate>Tue, 22 Nov 2011 11:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2050</guid>

					<description><![CDATA[Good one. I&#039;ll try it next time.
Typically, I wouldn&#039;t return errors in the same sproc which returns the data set, but it is a fair point. What gets me thinking is how we can stop building stuff like usp_rs_&#060;reportname&#062; for each report and substitute with something more reusable. Especially considering that in a typical data mart we end up writing similar queries for similar reports.
Would&#039;ve loved to see a little argument mentioning how bad it is to write _all_ of the code in SSRS, though...I still have to convince all sorts of devs/dbas that writing all the code in SSRS is rubbish too...]]></description>
			<content:encoded><![CDATA[<p>Good one. I&#8217;ll try it next time.<br />
Typically, I wouldn&#8217;t return errors in the same sproc which returns the data set, but it is a fair point. What gets me thinking is how we can stop building stuff like usp_rs_&lt;reportname&gt; for each report and substitute with something more reusable. Especially considering that in a typical data mart we end up writing similar queries for similar reports.<br />
Would&#8217;ve loved to see a little argument mentioning how bad it is to write _all_ of the code in SSRS, though&#8230;I still have to convince all sorts of devs/dbas that writing all the code in SSRS is rubbish too&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Rob Farley		</title>
		<link>https://lobsterpot.com.au/blog/2011/11/22/stored-procedures-with-ssrs-hmm-not-so-much/#comment-2049</link>

		<dc:creator><![CDATA[Rob Farley]]></dc:creator>
		<pubDate>Tue, 22 Nov 2011 07:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3055#comment-2049</guid>

					<description><![CDATA[It&#039;s nice to see a discussion over at &lt;a href=&quot;http://sqlblog.com/blogs/merrill_aldrich/archive/2011/11/07/t-sql-tuesday-24-ode-to-composable-code.aspx&quot; rel=&quot;nofollow ugc&quot;&gt;http://sqlblog.com/blogs/merrill_aldrich/archive/2011/11/07/t-sql-tuesday-24-ode-to-composable-code.aspx&lt;/a&gt;, where Jamie &#038; Merrill discuss the value of TVFs too.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nice to see a discussion over at <a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2011/11/07/t-sql-tuesday-24-ode-to-composable-code.aspx" rel="nofollow ugc">http://sqlblog.com/blogs/merrill_aldrich/archive/2011/11/07/t-sql-tuesday-24-ode-to-composable-code.aspx</a>, where Jamie &amp; Merrill discuss the value of TVFs too.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
