<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-2464671453929617720</id><updated>2009-04-02T08:36:40.897+01:00</updated><title type='text'>The Accidental Coder</title><subtitle type='html'>"Beauty is in the eye of the coder"</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://accidentalcoder.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default'/><link rel='alternate' type='text/html' href='http://accidentalcoder.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rooks</name><uri>http://www.blogger.com/profile/17248090553625223080</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2464671453929617720.post-6760451633154236388</id><published>2008-02-25T08:57:00.001Z</published><updated>2008-02-25T08:58:20.271Z</updated><title type='text'>New Blog Soon</title><content type='html'>I'm setting up a new home at: http://blogs.sourcecoder.org.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2464671453929617720-6760451633154236388?l=accidentalcoder.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://accidentalcoder.blogspot.com/feeds/6760451633154236388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2464671453929617720&amp;postID=6760451633154236388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/6760451633154236388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/6760451633154236388'/><link rel='alternate' type='text/html' href='http://accidentalcoder.blogspot.com/2008/02/new-blog-soon.html' title='New Blog Soon'/><author><name>Rooks</name><uri>http://www.blogger.com/profile/17248090553625223080</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08933836417610880249'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2464671453929617720.post-4692003749136123912</id><published>2008-01-26T20:43:00.000Z</published><updated>2008-01-26T21:06:43.454Z</updated><title type='text'>Bulk Updates in T-SQL without Cursors</title><content type='html'>Sometimes you may want to perform a mass update on a table based on the contents of another table. The first thing you may think of is using a cursor to scroll through Table A and update Table B line by line. This is extremely slow. However, there is another way.&lt;br /&gt;&lt;br /&gt;The way to do it is to join the two tables together then perform a self-update.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;UPDATE Product&lt;br /&gt;    SET Price = NewPrice&lt;br /&gt;    FROM Product&lt;br /&gt;INNER JOIN UpdatedProduct ON UpdatedProduct .ProductId = Product.ProductId&lt;/blockquote&gt;So what have I done there? Well the first two lines instruct the dbms to update the Product table, altering the price. The second two lines provide a join of the 2 tables we are using and an interim relation that the Update can use as it's source. At table of 250,000 records took 3 seconds to update with this method but over 30 minutes using a cursor so the benefits are huge.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2464671453929617720-4692003749136123912?l=accidentalcoder.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://accidentalcoder.blogspot.com/feeds/4692003749136123912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2464671453929617720&amp;postID=4692003749136123912' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/4692003749136123912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/4692003749136123912'/><link rel='alternate' type='text/html' href='http://accidentalcoder.blogspot.com/2008/01/bulk-updates-in-t-sql-without-cursors.html' title='Bulk Updates in T-SQL without Cursors'/><author><name>Rooks</name><uri>http://www.blogger.com/profile/17248090553625223080</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08933836417610880249'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2464671453929617720.post-3346230118139616928</id><published>2008-01-08T20:16:00.000Z</published><updated>2008-01-08T20:39:42.372Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='T-SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='Coalescing'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Lesser known elements of C#: Coalescing</title><content type='html'>Unless you read through all 800 or so pages of the C# specification, and honestly I've had more fun bashing my head against a bowl of weetabix then you could be forgiven for missing out of some of the lesser known elements of the language. One of which is the coalescing operator. You may have come across the term "Coalesce" in SQL and the meaning is almost identical in C#. Let's look at an example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;string YourName = SomeString ?? "Joe Public";&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So what does this means? Well if the string "SomeString" is null then the string "YourName" will be set to "Joe Public". If it's not null then the string "YourName" will be set to the value of "SomeString". So the element before the ?? operator will be used unless it's null, in which case the element after the ?? operator is used. In essence this is similar to the ISNULL feature of T-SQL or the COALESCE feature of SQL. It's not something that'll change your life for the better but it's a great party trick because, in my own experience, a lot of c# programmers haven't come across it. So go nuts, impress your friends :)&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2464671453929617720-3346230118139616928?l=accidentalcoder.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://accidentalcoder.blogspot.com/feeds/3346230118139616928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2464671453929617720&amp;postID=3346230118139616928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/3346230118139616928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/3346230118139616928'/><link rel='alternate' type='text/html' href='http://accidentalcoder.blogspot.com/2008/01/lesser-known-elements-of-c-coalescing.html' title='Lesser known elements of C#: Coalescing'/><author><name>Rooks</name><uri>http://www.blogger.com/profile/17248090553625223080</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08933836417610880249'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2464671453929617720.post-1225610885696867223</id><published>2008-01-06T19:48:00.000Z</published><updated>2008-01-06T20:42:01.653Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cannon Fodder'/><category scheme='http://www.blogger.com/atom/ns#' term='Law'/><title type='text'>So it begins..</title><content type='html'>That's the title of the first level of "Cannon Fodder", a rather splendid game from the 1990's. So I'd guess I'd best introduce myself since no-one else will (and if they do then you may be hearing voices - go get that checked :) ). I'm a 32-year old developer from the British Isles specialising in .NET, C#, Java, SQL and insanely obscure TV knowledge. I say "British Isles" because my developing skills (or lack of :)) has taken me to all over the place including Jersey, Exeter, London, Birmingham and even the Isle of Man.&lt;br /&gt;&lt;br /&gt;Why "The Accidental Coder"? Well, way back when, it was always planned that I was going to be a lawyer. I studied both Law and Politics at A-Level but a "B" grade in Physics put pay to my entry into Law at university. I decided to take Computer Science instead and the rest is history. This blog, possibly the finest blog on this page, will probably be mostly developer related but I tend to ramble so expect a wide variety of topics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2464671453929617720-1225610885696867223?l=accidentalcoder.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://accidentalcoder.blogspot.com/feeds/1225610885696867223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2464671453929617720&amp;postID=1225610885696867223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/1225610885696867223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2464671453929617720/posts/default/1225610885696867223'/><link rel='alternate' type='text/html' href='http://accidentalcoder.blogspot.com/2008/01/so-it-begins.html' title='So it begins..'/><author><name>Rooks</name><uri>http://www.blogger.com/profile/17248090553625223080</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08933836417610880249'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>