<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Chris Crowe's Blog</title>
        <link>http://blog.crowe.co.nz/blog/Default.aspx</link>
        <description>Ramblings of an IIS MVP ( MVP Since 1997 )</description>
        <language>en-NZ</language>
        <copyright>Chris Crowe</copyright>
        <managingEditor>blog@crowe.co.nz</managingEditor>
        <generator>Subtext Version 1.9.4.0</generator>
        <image>
            <title>Chris Crowe's Blog</title>
            <url>http://blog.crowe.co.nz/blog/images/RSS2Image.gif</url>
            <link>http://blog.crowe.co.nz/blog/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>The row value(s) updated or deleted either do not make the row unique or they alter multiple rows.</title>
            <link>http://blog.crowe.co.nz/blog/archive/2010/08/30/The-row-values-updated-or-deleted-either-do-not-make.aspx</link>
            <description>&lt;p&gt;I had a user ask me today how they can delete a duplicate row from their database table. They were receiving the following error message when they tried to delete the duplicate row.&lt;/p&gt;  &lt;p&gt;&lt;i&gt;The row value&lt;/i&gt;(s) &lt;em&gt;updated or deleted either do not make the row unique or they alter multiple rows&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;The reason that the user gets this message is because the table did not have a Primary Key or other Unique Index defined. Why, that’s another story and not one I know!&lt;/p&gt;  &lt;p&gt;An example table&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_thumb.png" width="344" height="107" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Some example data&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_thumb_1.png" width="277" height="133" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice the duplicate row (row 1 and row 3)&lt;/p&gt;  &lt;p&gt;So the user in this case would select the first row and hit the delete button&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_thumb_2.png" width="431" height="165" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;They would then see this message&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_thumb_3.png" width="434" height="230" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So how do we get rid of the duplicate row?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Two options&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Option #1&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Add a new column which contains unique values&lt;/p&gt;  &lt;p&gt;We could run the following code to add the new column and populate the new column with unique values&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;ALTER TABLE Table1       &lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;ADD TempID int IDENTITY(1, 1)&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;After issuing this command we will have something like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/Therowvaluesupdatedordeletedeitherdonot_B59F/image_thumb_4.png" width="444" height="129" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The user can now select their row and hit delete because SQL Server can uniquely identify this row.&lt;/p&gt;  &lt;p&gt;You could then remove the new column&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;ALTER TABLE Table1       &lt;br /&gt;drop COLUMN TempID &lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;But this adds a new column to the table which is not really the best option so on to option #2&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Option #2&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We can simply issue a simple delete command taking advantage of the &lt;strong&gt;Set RowCount &lt;/strong&gt;command.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;SET ROWCOUNT 1&lt;/strong&gt;&lt;/p&gt;   &lt;strong&gt;     &lt;p&gt;       &lt;br /&gt;&lt;/p&gt;     &lt;strong&gt;DELETE FROM Table1       &lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;WHERE id= 1&lt;/strong&gt;&lt;/strong&gt;&lt;/blockquote&gt;  &lt;p&gt;What this does is limit the delete command to one record. Since the data is duplicated you do not care which row is deleted as long as only one of the rows is deleted. No adding and removing columns.&lt;/p&gt;&lt;img src="http://blog.crowe.co.nz/blog/aggbug/929.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/blog/archive/2010/08/30/The-row-values-updated-or-deleted-either-do-not-make.aspx</guid>
            <pubDate>Tue, 31 Aug 2010 00:55:09 GMT</pubDate>
            <wfw:comment>http://blog.crowe.co.nz/blog/comments/929.aspx</wfw:comment>
            <comments>http://blog.crowe.co.nz/blog/archive/2010/08/30/The-row-values-updated-or-deleted-either-do-not-make.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crowe.co.nz/blog/comments/commentRss/929.aspx</wfw:commentRss>
        </item>
        <item>
            <title>WebMatrix - a complete Web development stack that integrates a Web server, Database and more</title>
            <link>http://blog.crowe.co.nz/blog/archive/2010/07/06/WebMatrix---a-complete-Web-development-stack-that-integrates-a.aspx</link>
            <description>&lt;p&gt;WebMatrix includes a complete Web development stack that integrates a Web server (IIS Developer Express), database (Microsoft SQL Server Compact 4.0), programming model (ASP.NET Web pages with Razor syntax), and a tool (WebMatrix Beta) into a seamless experience.  You can use WebMatrix to streamline the way you create an ASP.NET Web site from templates, or by starting a new Web site by using the world’s most popular free and open source (ASP.NET or PHP) apps like DotNetNuke, Umbraco, WordPress, or Joomla!. With WebMatrix you can code your Web sites, customize them, optimize them for good search engine ranking, test them, and deploy them to an Internet hosting company, all through the tool.&lt;/p&gt;  &lt;p&gt;Learn more about WebMatrix through:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=195076&amp;amp;clcid=0x409"&gt;What is WebMatrix&lt;/a&gt;?  &lt;/li&gt;    &lt;li&gt;Investigate the top &lt;a href="http://go.microsoft.com/fwlink/?LinkID=195935&amp;amp;clcid=0x409"&gt;10 features&lt;/a&gt; of WebMatrix.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=195938&amp;amp;clcid=0x409"&gt;Download WebMatrix Beta&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;More about &lt;a href="http://go.microsoft.com/fwlink/?LinkID=195075&amp;amp;clcid=0x409"&gt;IIS Developer Express&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;More about &lt;a href="http://go.microsoft.com/fwlink/?LinkID=195939&amp;amp;clcid=0x409"&gt;Microsoft SQL Server Compact 4.0&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For additional resources, visit:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=196364&amp;amp;clcid=0x409"&gt;Learn more&lt;/a&gt; about WebMatrix Beta. More resources, links to forums and feedback channels.&lt;/li&gt;    &lt;li&gt;Visit the forums on the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=195074&amp;amp;clcid=0x409"&gt;IIS Web site&lt;/a&gt; or the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=193026&amp;amp;clcid=0x409"&gt;ASP.NET Web site&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=195940&amp;amp;clcid=0x409"&gt;File a bug or suggestion&lt;/a&gt; on WebMatrix Beta.&lt;/li&gt;    &lt;li&gt;Learn to program the Web using &lt;a href="http://go.microsoft.com/fwlink/?LinkID=195072&amp;amp;clcid=0x409"&gt;ASP.NET Web pages with Razor syntax&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=195073&amp;amp;clcid=0x409"&gt;Download applications with WebMatrix&lt;/a&gt; and the Web Application Gallery.&lt;/li&gt;    &lt;li&gt;Review the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=196179&amp;amp;clcid=0x409"&gt;FAQs&lt;/a&gt; for Open Source and Free Web applications.&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blog.crowe.co.nz/blog/aggbug/928.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/blog/archive/2010/07/06/WebMatrix---a-complete-Web-development-stack-that-integrates-a.aspx</guid>
            <pubDate>Tue, 06 Jul 2010 19:49:26 GMT</pubDate>
            <wfw:comment>http://blog.crowe.co.nz/blog/comments/928.aspx</wfw:comment>
            <comments>http://blog.crowe.co.nz/blog/archive/2010/07/06/WebMatrix---a-complete-Web-development-stack-that-integrates-a.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/blog/comments/commentRss/928.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Looking for a way to find text in your SQL Database objects, then try the free Re-Gate SQL Search</title>
            <link>http://blog.crowe.co.nz/blog/archive/2010/06/27/Looking-for-a-way-to-find-text-in-your-SQL.aspx</link>
            <description>&lt;p&gt;To start I should mention that you can not search the actual data in your tables for text, but you can search your SQL Objects – Tables, Views, Stored Procedures, Constraints, Triggers and Functions for text.&lt;/p&gt;  &lt;p&gt;Often you want to find all references to a particular piece of text which could be the name of a table or column or just something that you have in a stored procedure.&lt;/p&gt;  &lt;p&gt;The free tool from Red-Gate software fits the bill well, supporting SQL 2005 and above (including the express editions of Management Studio – See below for notes on SQL Express 2005)&lt;/p&gt;  &lt;p&gt;There is some advertising links to their other products included in the tool, but they are well worth a look at if you have never used them before – Red-Gate products are great.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Downloading the tool&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To download the tool simply go to &lt;a title="http://www.red-gate.com/products/sql_search/" href="http://www.red-gate.com/products/sql_search/"&gt;http://www.red-gate.com/products/sql_search/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Installation     &lt;br /&gt;&lt;/strong&gt;After you install SQL Search you get a new toolbar with a single button &lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/LookingforawaytofindtextinyourSQLDatabas_CD32/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/LookingforawaytofindtextinyourSQLDatabas_CD32/image_thumb.png" width="111" height="33" /&gt;&lt;/a&gt;  in SQL Server Management Studio. Clicking this button opens the UI which add a new tab to the current set of open tabs and will select the current database as the database to be searched (you can change this from the drop down). &lt;/p&gt;  &lt;p&gt;Note: You can only search a single database at a time.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/LookingforawaytofindtextinyourSQLDatabas_CD32/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/LookingforawaytofindtextinyourSQLDatabas_CD32/image_thumb_1.png" width="800" height="68" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The search is activated by simply typing into the search field and your results are immediately displayed in a grid (no need to hit enter). &lt;/p&gt;  &lt;p&gt;You can limit the search to different types of objects such as tables or views if needed.&lt;/p&gt;  &lt;p&gt;Clicking on any of the search results will display the full text of the object where it was found with any matching text highlighted.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/LookingforawaytofindtextinyourSQLDatabas_CD32/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.crowe.co.nz/blog/images/blog_crowe_co_nz/blog/WindowsLiveWriter/LookingforawaytofindtextinyourSQLDatabas_CD32/image_thumb_2.png" width="800" height="367" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL 2005 Management Studio Express&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This statement is included on the requirements page for SQL Search at &lt;a title="http://www.red-gate.com/products/sql_search/requirements.htm" href="http://www.red-gate.com/products/sql_search/requirements.htm"&gt;http://www.red-gate.com/products/sql_search/requirements.htm&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* To use SQL Search with SSMS 2005 Express Edition, &lt;em&gt;extensibility.dll&lt;/em&gt; must be installed.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;But then they give you no indication of what that means or where you get it from. &lt;/p&gt;  &lt;p&gt;You can download the &lt;b&gt;extensibility&lt;/b&gt;.&lt;b&gt;dll&lt;/b&gt; by installing the following tool:    &lt;br /&gt;&lt;a href="ftp://ftp.red-gate.com/development/sqlprompt/extensibilitymsm.msi"&gt;ftp://ftp.red-gate.com/development/sqlprompt/extensibilitymsm.msi&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blog.crowe.co.nz/blog/aggbug/927.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/blog/archive/2010/06/27/Looking-for-a-way-to-find-text-in-your-SQL.aspx</guid>
            <pubDate>Mon, 28 Jun 2010 02:35:47 GMT</pubDate>
            <wfw:comment>http://blog.crowe.co.nz/blog/comments/927.aspx</wfw:comment>
            <comments>http://blog.crowe.co.nz/blog/archive/2010/06/27/Looking-for-a-way-to-find-text-in-your-SQL.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/blog/comments/commentRss/927.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>