<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblogcasts.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>Alex_Kuznetsov - All Comments</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>re: Using a Foreign key constraint to check validity of History Windows (Start - End Date Windows)</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/07/using-a-foreign-key-constraint-to-check-validity-of-history-windows-start-end-date-windows.aspx#11113</link><pubDate>Thu, 18 Dec 2008 14:52:05 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:11113</guid><dc:creator>Razvan Socol</dc:creator><description>&lt;p&gt;We also need a constraint to check that StartedAt&amp;lt;=FinishedAt.&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=11113" width="1" height="1"&gt;</description></item><item><title>Remove All Non-Numeric Characters From A String</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/23/remove-all-non-numeric-characters-from-a-string.aspx#10816</link><pubDate>Thu, 18 Sep 2008 18:54:12 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:10816</guid><dc:creator>Strate SQL</dc:creator><description>&lt;p&gt;I completely lack creativity today but thought this link on removing non-numeric characters was kind&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=10816" width="1" height="1"&gt;</description></item><item><title>re: Remove all non-numeric characters from a string.</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/23/remove-all-non-numeric-characters-from-a-string.aspx#7882</link><pubDate>Tue, 26 Feb 2008 16:09:33 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:7882</guid><dc:creator>Alex_Kuznetsov</dc:creator><description>&lt;p&gt;I think Simon's solution is better:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://sqlblogcasts.com/blogs/simons/archive/2008/02/26/String-cleaning-with-TSQL.aspx"&gt;http://sqlblogcasts.com/blogs/simons/archive/2008/02/26/String-cleaning-with-TSQL.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=7882" width="1" height="1"&gt;</description></item><item><title>re: Remove all non-numeric characters from a string.</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/23/remove-all-non-numeric-characters-from-a-string.aspx#7789</link><pubDate>Mon, 25 Feb 2008 08:14:48 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:7789</guid><dc:creator>Madhivanan</dc:creator><description>&lt;p&gt;Other similar method&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/18/extract-only-numbers-from-a-string.aspx"&gt;http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/18/extract-only-numbers-from-a-string.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=7789" width="1" height="1"&gt;</description></item><item><title>re: Vote for TOP(@n) OVER(PARTITION BY ... ORDER BY ...) syntax</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/23/vote-for-top-n-over-partition-by-order-by-syntax.aspx#7720</link><pubDate>Sat, 23 Feb 2008 21:30:40 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:7720</guid><dc:creator>Alex_Kuznetsov</dc:creator><description>&lt;p&gt;Adam,&lt;/p&gt;
&lt;p&gt;A duplicate indeed. Note that because all the details of Itzik's suggestion were in an attached document, the search did not bring it up for me. &lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=7720" width="1" height="1"&gt;</description></item><item><title>re: Vote for TOP(@n) OVER(PARTITION BY ... ORDER BY ...) syntax</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/23/vote-for-top-n-over-partition-by-order-by-syntax.aspx#7719</link><pubDate>Sat, 23 Feb 2008 20:38:22 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:7719</guid><dc:creator>AdamMachanic</dc:creator><description>&lt;p&gt;This is a duplicate of the following item:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=254390"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=254390&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=7719" width="1" height="1"&gt;</description></item><item><title>re: Vote for TOP(@n) OVER(PARTITION BY ... ORDER BY ...) syntax</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/23/vote-for-top-n-over-partition-by-order-by-syntax.aspx#7715</link><pubDate>Sat, 23 Feb 2008 18:55:47 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:7715</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Great idea Alex. I voted 4 and added it to my watch list!!&lt;/p&gt;
&lt;p&gt;-Jamie&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=7715" width="1" height="1"&gt;</description></item><item><title>re: Using a Foreign key constraint to check validity of History Windows (Start - End Date Windows)</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/07/using-a-foreign-key-constraint-to-check-validity-of-history-windows-start-end-date-windows.aspx#6916</link><pubDate>Thu, 07 Feb 2008 22:20:28 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:6916</guid><dc:creator>AdamMachanic</dc:creator><description>&lt;p&gt;Clever! &amp;nbsp;I like it!&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=6916" width="1" height="1"&gt;</description></item><item><title>re: List of tables without primary keys</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2008/02/06/list-of-tables-without-primary-keys.aspx#6874</link><pubDate>Thu, 07 Feb 2008 05:46:29 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:6874</guid><dc:creator>Uri Dimant</dc:creator><description>&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://dimantdatabasesolutions.blogspot.com/2007/11/tables-that-do-not-have-primary-key.html"&gt;http://dimantdatabasesolutions.blogspot.com/2007/11/tables-that-do-not-have-primary-key.html&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=6874" width="1" height="1"&gt;</description></item><item><title>re: When It Is OK to Use SELECT * in Production Code.</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2007/10/19/can-i-use-select-in-my-production-code.aspx#5500</link><pubDate>Thu, 13 Dec 2007 08:50:41 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:5500</guid><dc:creator>Madhivanan</dc:creator><description>&lt;p&gt;Other case to use SELECT * is when checking for existance of the data&lt;/p&gt;
&lt;p&gt;IF EXISTS(SELECT * FROM.........)&lt;/p&gt;
&lt;p&gt;BEGIN&lt;/p&gt;
&lt;p&gt;-- do some stuff here&lt;/p&gt;
&lt;p&gt;END&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=5500" width="1" height="1"&gt;</description></item><item><title>re: When It Is OK to Use SELECT * in Production Code.</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2007/10/19/can-i-use-select-in-my-production-code.aspx#5499</link><pubDate>Thu, 13 Dec 2007 08:49:20 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:5499</guid><dc:creator>Madhivanan</dc:creator><description>&lt;p&gt;Other case to use SELECT * is when checking for existance of the data&lt;/p&gt;
&lt;p&gt;IF EXISTS(SELECT * FROM.........)&lt;/p&gt;
&lt;p&gt;BEGIN&lt;/p&gt;
&lt;p&gt;-- do some stuff here&lt;/p&gt;
&lt;p&gt;END&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=5499" width="1" height="1"&gt;</description></item><item><title>re: When SUM of Six Floats Depends on Order of Adding</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2007/10/26/when-sum-of-six-floats-depends-on-order-of-adding.aspx#3017</link><pubDate>Fri, 26 Oct 2007 21:45:08 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:3017</guid><dc:creator>Hugo Kornelis</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;ANY datatype that has rounding issues, can have different results if the order of calculation is changed. That is clearly visible for float, as opposed to decimal, when doing additions with numbers with a finite number of decimal places. But when doing multiplications, the rounding issues of decimal are much easier to spot than the rounding problems of float:&lt;/p&gt;
&lt;p&gt;DECLARE @f1 float, @f2 float, @f3 float;&lt;/p&gt;
&lt;p&gt;DECLARE @n1 numeric(38,10), @n2 numeric(38,10), @n3 numeric(38,10);&lt;/p&gt;
&lt;p&gt;SET @f1 = 123456789.012345;&lt;/p&gt;
&lt;p&gt;SET @n1 = 123456789.012345;&lt;/p&gt;
&lt;p&gt;SET @f2 = 0.00001;&lt;/p&gt;
&lt;p&gt;SET @n2 = 0.00001;&lt;/p&gt;
&lt;p&gt;SET @f3 = 10000.0;&lt;/p&gt;
&lt;p&gt;SET @n3 = 10000.0;&lt;/p&gt;
&lt;p&gt;SELECT (@f1 * @f2) * @f3, (@f1 * @f3) * @f2;&lt;/p&gt;
&lt;p&gt;SELECT (@n1 * @n2) * @n3, (@n1 * @n3) * @n2;&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=3017" width="1" height="1"&gt;</description></item><item><title>Pythian Group Blog  &amp;raquo; Blog Archive   &amp;raquo; Log Buffer #68: a Carnival of the Vanities for DBAs</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2007/10/19/can-i-use-select-in-my-production-code.aspx#3008</link><pubDate>Fri, 26 Oct 2007 18:13:34 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:3008</guid><dc:creator>Pythian Group Blog  » Blog Archive   » Log Buffer #68: a Carnival of the Vanities for DBAs</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.pythian.com/blogs/645/log-buffer-68-a-carnival-of-the-vanities-for-dbas"&gt;http://www.pythian.com/blogs/645/log-buffer-68-a-carnival-of-the-vanities-for-dbas&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=3008" width="1" height="1"&gt;</description></item><item><title>re: Yet another index covering tip</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2007/09/14/yet-another-index-covering-tip.aspx#2557</link><pubDate>Sun, 23 Sep 2007 19:24:48 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:2557</guid><dc:creator>Alex_Kuznetsov</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Actually I did not mean INCLUDE clause. I meant 2000 as well as 2005 and I don't think I'm suggesting an overkill. Suppose my Customers table is currently clustered on CustomerID. Suppose I have a NCI on (SignUpDate). Supoose I have a query&lt;/p&gt;
&lt;p&gt;SELECT &amp;lt;list of columns from Orders table only&amp;gt;&lt;/p&gt;
&lt;p&gt;FROM Customers c JOIN Orders o ON c.CustomerID = o.CustomerID&lt;/p&gt;
&lt;p&gt;WHERE o.SignUpDate BETWEEN '20070101' AND '20070201'&lt;/p&gt;
&lt;p&gt;At that time my index on (SignUpDate) already covers the query. Note that another index on (SignUpDate, CustomerID) would be essentially the same, of the same size.&lt;/p&gt;
&lt;p&gt;However, suppose some time later I want to change my clustering index from CustomerID to (PhoneNUmber, DOB). At that time my index on (SignUpDate) will no longer be coveriny for the query I provided above. However, the index on (SignUpDate, CustomerID) will still be covering.&lt;/p&gt;
&lt;p&gt;My point is quite simple: if you explicitly specify columns which you need for index covering, including bookmark columns, you index will be essentially the same, but it will allow you to switch to another CI faster.&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=2557" width="1" height="1"&gt;</description></item><item><title>re: Yet another index covering tip</title><link>http://sqlblogcasts.com/blogs/alex_kuznetsov/archive/2007/09/14/yet-another-index-covering-tip.aspx#2535</link><pubDate>Wed, 19 Sep 2007 09:49:45 GMT</pubDate><guid isPermaLink="false">fa8c4e8e-46a3-4193-8264-2c1a9cb3475d:2535</guid><dc:creator>simonsabin</dc:creator><description>&lt;p&gt;I assume you mean use the INCLUDE clause and not just include the column in the keys of the index as that is over kill.&lt;/p&gt;
&lt;p&gt;Obviously this isn't possible with SQL2000 and below in which case I would say, droppping and recreating a clustered index should be assessed for impact as it will have a huge impact on your query performance and should only be done whilst assessing ALL queries that access the system.&lt;/p&gt;
&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=2535" width="1" height="1"&gt;</description></item></channel></rss>