<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/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>Deferred Processing - All Comments</title><link>http://www.pluralsight.com/community/blogs/dan/default.aspx</link><description>.NET, XML, SQL and Doing Things as Time Allows</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>re: Yet Another Median Calculation</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2005/09/28/15073.aspx#55218</link><pubDate>Sun, 23 Nov 2008 04:26:22 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:55218</guid><dc:creator>Wayne Gr</dc:creator><description>&lt;p&gt;-- This routine accurately gets Median using the TOP xx perecent method&lt;/p&gt;
&lt;p&gt;CREATE TABLE Centres (CallCount SMALLMONEY not null) &lt;/p&gt;
&lt;p&gt;GO &lt;/p&gt;
&lt;p&gt;DECLARE @Median SMALLMONEY&lt;/p&gt;
&lt;p&gt;INSERT INTO Centres - get top centre value &lt;/p&gt;
&lt;p&gt;SELECT TOP 1 &amp;nbsp;dRecord as CallCount&lt;/p&gt;
&lt;p&gt;FROM (SELECT TOP 50 PERCENT dRecord FROM dBase ORDER BY dRecord asc ) sub Order by &amp;nbsp;dRecord desc&lt;/p&gt;
&lt;p&gt;INSERT INTO Centres get bottom centre value &lt;/p&gt;
&lt;p&gt;SELECT TOP 1 &amp;nbsp;dRecord as CallCount&lt;/p&gt;
&lt;p&gt;FROM (SELECT TOP 50 PERCENT dRecord FROM dBase ORDER BY dRecord DESC ) sub ORDER BY dRecord ASC &lt;/p&gt;
&lt;p&gt;SET @Median = (SELECT AVG(CallCount) FROM Centres)&lt;/p&gt;
&lt;p&gt;DROP TABLE Centres&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=55218" width="1" height="1"&gt;</description></item><item><title>re: Visual Studio &amp; XSLT Debugging</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2008/11/10/visual-studio-amp-xslt-debugging.aspx#54474</link><pubDate>Fri, 14 Nov 2008 17:18:04 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:54474</guid><dc:creator>dan-sullivan</dc:creator><description>&lt;p&gt;It should be working now.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=54474" width="1" height="1"&gt;</description></item><item><title>re: Visual Studio &amp; XSLT Debugging</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2008/11/10/visual-studio-amp-xslt-debugging.aspx#54336</link><pubDate>Tue, 11 Nov 2008 15:01:56 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:54336</guid><dc:creator>TomChmiel</dc:creator><description>&lt;p&gt;Dan, I would like to watch your tutorial but the link does not work.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=54336" width="1" height="1"&gt;</description></item><item><title>re: PowerShell and ADO.NET</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/10/29/41389.aspx#53570</link><pubDate>Fri, 19 Sep 2008 21:31:41 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:53570</guid><dc:creator>Mosaic</dc:creator><description>&lt;p&gt;Great - easy to find and just what I was looking for! &lt;/p&gt;
&lt;p&gt;Showing how to use both the DataTable and the DataReader allows me to handle both small and very large sets of data.&lt;/p&gt;
&lt;p&gt;Many thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=53570" width="1" height="1"&gt;</description></item><item><title>re: Evaluating String Arithmetic Expressions in SQL Server 2005</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/07/27/32597.aspx#53550</link><pubDate>Thu, 18 Sep 2008 20:08:38 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:53550</guid><dc:creator>Bebop</dc:creator><description>&lt;p&gt;The following link helped me get the c# code into SQL Server:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.sqlteam.com/article/writing-clr-stored-procedures-in-charp-introduction-to-charp-part-1"&gt;www.sqlteam.com/.../writing-clr-stored-procedures-in-charp-introduction-to-charp-part-1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I did have to use Dans modifications above. Just substitue articles code with code above including Dans mods, and name your StoredProcedure EvaluateArithmeticExpression.cs. Save. Build. Deploy. &lt;/p&gt;
&lt;p&gt;You will then see dbo.EvaluateArithmethicExpression under Scalar-valued Functions&lt;/p&gt;
&lt;p&gt;Also had to enable CLR integration:&lt;/p&gt;
&lt;p&gt;Start-All Programs-Microsoft SQL Server 2005-Configuration Tools-SQL Server Surface Area Configuration&lt;/p&gt;
&lt;p&gt;Then Surface Area Configuration for Features-SLR Integration-Enable CLR integration&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=53550" width="1" height="1"&gt;</description></item><item><title>re: Comparing XML in SQL Server 2005</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/09/01/36829.aspx#52997</link><pubDate>Sun, 14 Sep 2008 14:58:57 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52997</guid><dc:creator>Jacob Sebastian</dc:creator><description>&lt;p&gt;Nice work! This is one of the links I give people when they ask me about comparing two XML values. I just wrote a TSQL function that compares two XML values. &lt;a rel="nofollow" target="_new" href="http://www.sqlserverandxml.com/2008/09/xquery-lab-36-writing-tsql-function-to.html"&gt;www.sqlserverandxml.com/.../xquery-lab-36-writing-tsql-function-to.html&lt;/a&gt; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52997" width="1" height="1"&gt;</description></item><item><title>re: PowerShell and ADO.NET</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/10/29/41389.aspx#52309</link><pubDate>Fri, 01 Aug 2008 18:10:31 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:52309</guid><dc:creator>Nick</dc:creator><description>&lt;p&gt;Hey, &lt;/p&gt;
&lt;p&gt;Thanks for this blog entry, I figured out how to add a column to an existing dataset table. Now how would I populate the values in the column / rows (I need to combine a 1st name field and a last name field into a &amp;quot;full_name&amp;quot; field).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52309" width="1" height="1"&gt;</description></item><item><title>re: Evaluating String Arithmetic Expressions in SQL Server 2005</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/07/27/32597.aspx#51028</link><pubDate>Thu, 22 May 2008 20:35:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:51028</guid><dc:creator>Need Help</dc:creator><description>Where should I be putting the c# code? in SQL Server or in VS 2005&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=51028" width="1" height="1"&gt;</description></item><item><title>re: PowerShell and ADO.NET</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/10/29/41389.aspx#50514</link><pubDate>Tue, 18 Mar 2008 21:07:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50514</guid><dc:creator>bk</dc:creator><description>Awesome tutorial!!&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50514" width="1" height="1"&gt;</description></item><item><title>re: Processing XML with PowerShell II</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/11/28/43561.aspx#50507</link><pubDate>Tue, 18 Mar 2008 11:16:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50507</guid><dc:creator>Edward Benson</dc:creator><description>Very helpful article, thank you!&lt;br&gt;&lt;br&gt;The %{$_.Property} notation had me completely foxed, until I found out that % is alias of &amp;quot;ForEach-Object&amp;quot; (Using command &amp;quot;Get-Alias %&amp;quot;).&lt;br&gt;&lt;br&gt;Using &amp;quot;ForEach-Object&amp;quot;, in place of &amp;quot;%&amp;quot;, would make the code much clearer. And &amp;quot;Select-Object&amp;quot; would be clearer still.&lt;br&gt;&lt;br&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50507" width="1" height="1"&gt;</description></item><item><title>re: PowerSMO!</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/11/07/41936.aspx#50313</link><pubDate>Tue, 26 Feb 2008 10:51:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50313</guid><dc:creator>Dan</dc:creator><description>You can save it using IE to make an MHT archive that you can pass around. In IE-7 use Page-&amp;gt;Save As-&amp;gt;Web Archive Single File. You can view the *.mht file that it produces without being on line.&lt;br&gt;&lt;br&gt;Dan&lt;br&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50313" width="1" height="1"&gt;</description></item><item><title>re: PowerSMO!</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/11/07/41936.aspx#50310</link><pubDate>Tue, 26 Feb 2008 03:16:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50310</guid><dc:creator>Tracy Esau</dc:creator><description>can u please upload a pdf version so that we can read the article under our convinence &lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50310" width="1" height="1"&gt;</description></item><item><title>re: PowerShell and XmlDocument</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/10/30/41434.aspx#49477</link><pubDate>Tue, 18 Dec 2007 18:13:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:49477</guid><dc:creator>ScriptRunner</dc:creator><description>Nice article, very helpful...&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=49477" width="1" height="1"&gt;</description></item><item><title>re: Evaluating String Arithmetic Expressions in SQL Server 2005</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/07/27/32597.aspx#48793</link><pubDate>Wed, 17 Oct 2007 12:10:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:48793</guid><dc:creator>Maddy</dc:creator><description>I tried deploying the CLR function given above. Now when i try to execute the function from SQL server, It's not giving the proper results.&lt;br&gt;Like if I pass the parameter as 1+2+3, then it return me value of 1 i.e. always returns the 1st number.&lt;br&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=48793" width="1" height="1"&gt;</description></item><item><title>re: Evaluating String Arithmetic Expressions in SQL Server 2005</title><link>http://www.pluralsight.com/community/blogs/dan/archive/2006/07/27/32597.aspx#48315</link><pubDate>Wed, 29 Aug 2007 03:24:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:48315</guid><dc:creator>Senthil</dc:creator><description>Hi, &lt;br&gt;When i try to create the procedure it throws this error&lt;br&gt;Msg 6567, Level 16, State 2, Procedure EvaluateArithmethicExpression, Line 1&lt;br&gt;CREATE PROCEDURE failed because a CLR Procedure may only be defined on CLR methods that return either SqlInt32, System.Int32, void.&lt;br&gt;&lt;br&gt;this is my Procedure&lt;br&gt;CREATE PROCEDURE EvaluateArithmethicExpression&lt;br&gt;@input nvarchar(200)&lt;br&gt;AS EXTERNAL NAME &lt;br&gt;ArithmeticCalculations.ArithmeticCalculations.EvaluateArithmethicExpression&lt;br&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=48315" width="1" height="1"&gt;</description></item></channel></rss>