﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>PCACAC: Forum Posts</title><link>http://www.pcacac.orgForum/Topics.aspx</link><description>Forum Posts for PCACAC</description><copyright>Copyright &amp;copy 2008 PCACAC. All Rights Reserved.</copyright><ttl>20</ttl><item><title>Test</title><description>&lt;p&gt;Just testing for ya. Gotta find something to do on my last day before vacation.&lt;/p&gt;</description><link>http://www.pcacac.orgForum/Thread.aspx?th=3</link><author>Kerry Greenstein</author></item><item><title>the second reply</title><description>&lt;div class="quote"&gt;Robby Knight wrote:&lt;br /&gt;
&lt;p&gt;completely untrue test data&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;
&lt;pre&gt;[SqlException (0x80131904): Divide by zero error encountered.]&lt;br /&gt;   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +859322&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +736198&lt;br /&gt;   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188&lt;br /&gt;   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1959&lt;br /&gt;   System.Data.SqlClient.SqlDataReader.HasMoreRows() +150&lt;br /&gt;   System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +214&lt;br /&gt;   System.Data.SqlClient.SqlDataReader.NextResult() +162&lt;br /&gt;   System.Data.ProviderBase.DataReaderContainer.NextResult() +16&lt;br /&gt;   System.Data.Common.DataAdapter.FillNextResult(DataReaderContain&lt;/pre&gt;
&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This reply includes the quote from the previous reply&lt;/p&gt;</description><link>http://www.pcacac.orgForum/Thread.aspx?th=2</link><author>Robert Knight</author></item><item><title>the second reply</title><description>&lt;p&gt;completely untrue test data&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;
&lt;pre&gt;[SqlException (0x80131904): Divide by zero error encountered.]&lt;br /&gt;   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +859322&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +736198&lt;br /&gt;   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188&lt;br /&gt;   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1959&lt;br /&gt;   System.Data.SqlClient.SqlDataReader.HasMoreRows() +150&lt;br /&gt;   System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +214&lt;br /&gt;   System.Data.SqlClient.SqlDataReader.NextResult() +162&lt;br /&gt;   System.Data.ProviderBase.DataReaderContainer.NextResult() +16&lt;br /&gt;   System.Data.Common.DataAdapter.FillNextResult(DataReaderContain&lt;/pre&gt;
&lt;/font&gt;&lt;/p&gt;</description><link>http://www.pcacac.orgForum/Thread.aspx?th=2</link><author>Robert Knight</author></item><item><title>the second reply</title><description>&lt;p&gt;Latest post: &lt;a href="http://www.codeplex.com/site/users/view/rbeezley" id="ctl00_ctl00_Content_TabContentPanel_Content_ThreadList_ctl02_LatestPostPreview_PostUserName"&gt;rbeezley&lt;/a&gt; wrote: Thanks Thoze... That is exactly what I needed. One additional question. It is not&lt;/p&gt;</description><link>http://www.pcacac.orgForum/Thread.aspx?th=2</link><author>Robert Knight</author></item><item><title>First Reply</title><description>&lt;p&gt;Thankfully there are a few options for dynamic SQL in a stored procedure. One option would to be to use a &lt;code&gt;CASE&lt;/code&gt; statement in the &lt;code&gt;ORDER BY&lt;/code&gt; clause, as discussed in &lt;a href="http://www.4guysfromrolla.com/webtech/010704-1.shtml"&gt;Dynamic &lt;code&gt;ORDER BY&lt;/code&gt; Statements  in Stored Procedures&lt;/a&gt; and &lt;a href="http://www.4guysfromrolla.com/webtech/102704-1.shtml"&gt;The Power of SQL &lt;code&gt;CASE&lt;/code&gt; Statements&lt;/a&gt;. Unfortunately this hampers the performance when sorting non-string columns because of conversion requirements and so forth.&lt;/p&gt;
&lt;p&gt;A better performing option is to build and execute a dynamic SQL statement, a technique which is also discussed in  &lt;em&gt;Dynamic &lt;code&gt;ORDER BY&lt;/code&gt; Statements in Stored Procedures&lt;/em&gt;. This approach, with indexes on the columns that may be sorted, offers performance time akin to the custom paging without sorting.&lt;/p&gt;</description><link>http://www.pcacac.orgForum/Thread.aspx?th=1</link><author>Robert Knight</author></item></channel></rss>