<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2012-01-21:1440331</id>
  <title>eor</title>
  <subtitle>eor</subtitle>
  <author>
    <name>eor</name>
  </author>
  <link rel="alternate" type="text/html" href="https://eor.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://eor.dreamwidth.org/data/atom"/>
  <updated>2012-08-07T01:45:02Z</updated>
  <dw:journal username="eor" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2012-01-21:1440331:350811</id>
    <link rel="alternate" type="text/html" href="https://eor.dreamwidth.org/350811.html"/>
    <link rel="self" type="text/xml" href="https://eor.dreamwidth.org/data/atom/?itemid=350811"/>
    <title>SQL classics: #1</title>
    <published>2012-08-07T01:45:02Z</published>
    <updated>2012-08-07T01:45:02Z</updated>
    <category term="fail"/>
    <category term="sql"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">I do a lot of troubleshooting/refactoring of database queries.  By themselves they don't amount to much of anything, but when they all start working together small inefficiencies turn into large inefficiencies.  I've resisted sharing some of my favorite things because they're pure geek and very few people will find the humor in them.  But tonight I can't resist because I found one that is just too &lt;strike&gt;good&lt;/strike&gt; bad to be true.&lt;br /&gt;&lt;br /&gt;From a real SQL stored procedure, I couldn't make this stuff up, table names changed to protect the guilty:&lt;br /&gt;  Set &lt;span style='white-space: nowrap;'&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scencode'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scencode'&gt;&lt;b&gt;scencode&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; = (Select Code From the.table Where Num =&lt;span style='white-space: nowrap;'&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scenint'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scenint'&gt;&lt;b&gt;scenint&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;)&lt;br /&gt;  Set &lt;span style='white-space: nowrap;'&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scen'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scen'&gt;&lt;b&gt;scen&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; =(Select num From the.table Where Code =&lt;span style='white-space: nowrap;'&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scencode'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://www.dreamwidth.org/profile?user=scencode'&gt;&lt;b&gt;scencode&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Obfustication: 1&lt;br /&gt;Inefficiency: 2&lt;br /&gt;Utter Uselessness: 5&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=eor&amp;ditemid=350811" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
