<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>SQL Joint</title>
    <link>http://www.sqljoint.com/</link>
    <description>Den digitale SQL hukommelse</description>
    <language>en-us</language>
    <copyright>Sune Hansen</copyright>
    <lastBuildDate>Fri, 10 Mar 2006 12:33:46 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.1</generator>
    <managingEditor>sdh@vertica.dk</managingEditor>
    <webMaster>sdh@vertica.dk</webMaster>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=0ce4eceb-5bb3-4c29-9b67-bc15213855b9</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,0ce4eceb-5bb3-4c29-9b67-bc15213855b9.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,0ce4eceb-5bb3-4c29-9b67-bc15213855b9.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0ce4eceb-5bb3-4c29-9b67-bc15213855b9</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Okay, jeg synes nu egentlig meget godt om SQL Server, men det er jo ikke alle der
      deler min mening:
   </p>
        <p>
          <a href="http://weblogs.sqlteam.com/jeffs/archive/2005/05/24/5248.aspx">Top 10 Things
      I Hate About SQL Server</a>
        </p>
        <p>
      Husk også at læse kommentarerne :o)
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=0ce4eceb-5bb3-4c29-9b67-bc15213855b9" />
      </body>
      <title>Jeg hader SQL Server</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,0ce4eceb-5bb3-4c29-9b67-bc15213855b9.aspx</guid>
      <link>http://www.sqljoint.com/Jeg+Hader+SQL+Server.aspx</link>
      <pubDate>Fri, 10 Mar 2006 12:33:46 GMT</pubDate>
      <description>&lt;p&gt;
   Okay, jeg synes nu egentlig meget godt om SQL Server, men det er jo ikke alle der
   deler min mening:
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2005/05/24/5248.aspx"&gt;Top 10 Things
   I Hate About SQL Server&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Husk også at læse kommentarerne :o)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=0ce4eceb-5bb3-4c29-9b67-bc15213855b9" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,0ce4eceb-5bb3-4c29-9b67-bc15213855b9.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=719e3aee-f2bb-4d1a-ad87-8885983bf34c</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,719e3aee-f2bb-4d1a-ad87-8885983bf34c.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,719e3aee-f2bb-4d1a-ad87-8885983bf34c.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=719e3aee-f2bb-4d1a-ad87-8885983bf34c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Det er ikke de helt vildt streng funktioner, der findes i T-SQL (okay, måske bliver
      jeg klogere, når jeg får sat mig mere ind i T-SQL udvidelserne i SQL Server 2005,
      men i hvert fald ikke i SQL Server 2000). Men selv med de simple funktioner kan man
      lave nogle små fikse ting, hvis det bliver sat rigtigt sammen. I det følgende skal
      vi finde ud af, hvor mange gange et bestemt ord findes i en kolonne. 
   </p>
        <p>
      Vi har følgende table:
   </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CREATE</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TABLE</span> tbl_Demo
      (<br />
          DemoID <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INT</span>,<br />
          Description <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">VARCHAR</span>(8000)<br />
      )    </span>
        </p>
        <p>
      I den tabel vil vi finde ud af hvor mange gange order "server" i hver rækkes Description
      felt. Det kan gøres på følgende måde:
   </p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <p>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> Description,
      (<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEN</span>(Description)
      - <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEN</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">REPLACE</span>(Description, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'server'</span>, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">''</span>)))
      / <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEN</span>(<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'server'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> WordCount<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Demo</span>
          </p>
        </span>
        <p>
      Vi tager kort fortalt længden af Description feltet inkl. alle gange order "server"
      måtte optræde, og trækker længden af Description feltet uden ordet "server" fra. For
      at finde antallet af gang ’server’ indgår dividerer vi dette tal med længden af "server".
   </p>
        <p>
      Ved også at bruge udtrykket i en Order By kan vores statement tilmed bruges som en
      søgefunktion, der sortere de mest relevante resultater øverst:
   </p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> Description,
      (<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEN</span>(Description)
      - <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEN</span>(<span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">REPLACE</span>(Description, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'server'</span>, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">''</span>)))
      / <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LEN</span>(<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'server'</span>) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> WordCount<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Demo<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ORDER</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BY</span> WordCount <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DESC</span></span>
            </p>
          </span>
        </span>
        <p>
      Måske ikke lige frem optimalt hvad angår performance, men trods alt en prioriteret
      søgning.
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=719e3aee-f2bb-4d1a-ad87-8885983bf34c" />
      </body>
      <title>Antal gange et ord findes i en kolonne</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,719e3aee-f2bb-4d1a-ad87-8885983bf34c.aspx</guid>
      <link>http://www.sqljoint.com/Antal+Gange+Et+Ord+Findes+I+En+Kolonne.aspx</link>
      <pubDate>Fri, 25 Nov 2005 14:55:44 GMT</pubDate>
      <description>&lt;p&gt;
   Det er ikke de helt vildt streng funktioner, der findes i T-SQL (okay, måske bliver
   jeg klogere, når jeg får sat mig mere ind i T-SQL udvidelserne i SQL Server 2005,
   men i hvert fald ikke i SQL Server 2000). Men selv med de simple funktioner kan man
   lave nogle små fikse ting, hvis det bliver sat rigtigt sammen. I det følgende skal
   vi finde ud af, hvor mange gange et bestemt ord findes i en kolonne. 
&lt;/p&gt;
&lt;p&gt;
   Vi har følgende table:
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CREATE&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TABLE&lt;/span&gt; tbl_Demo
   (&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DemoID &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INT&lt;/span&gt;,&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Description &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;VARCHAR&lt;/span&gt;(8000)&lt;br&gt;
   )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   I den tabel vil vi finde ud af hvor mange gange order "server" i hver rækkes Description
   felt. Det kan gøres på følgende måde:
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; Description,
   (&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEN&lt;/span&gt;(Description)
   - &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEN&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;REPLACE&lt;/span&gt;(Description, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'server'&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;''&lt;/span&gt;)))
   / &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEN&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'server'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; WordCount&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Demo&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt; 
&lt;p&gt;
   Vi tager kort fortalt længden af Description feltet inkl. alle gange order "server"
   måtte optræde, og trækker længden af Description feltet uden ordet "server" fra. For
   at finde antallet af gang ’server’ indgår dividerer vi dette tal med længden af "server".
&lt;/p&gt;
&lt;p&gt;
   Ved også at bruge udtrykket i en Order By kan vores statement tilmed bruges som en
   søgefunktion, der sortere de mest relevante resultater øverst:
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; Description,
   (&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEN&lt;/span&gt;(Description)
   - &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEN&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;REPLACE&lt;/span&gt;(Description, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'server'&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;''&lt;/span&gt;)))
   / &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEN&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'server'&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; WordCount&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Demo&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ORDER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BY&lt;/span&gt; WordCount &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DESC&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt; 
&lt;p&gt;
   Måske ikke lige frem optimalt hvad angår performance, men trods alt en prioriteret
   søgning.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=719e3aee-f2bb-4d1a-ad87-8885983bf34c" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,719e3aee-f2bb-4d1a-ad87-8885983bf34c.aspx</comments>
      <category>T-SQL</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=a7ae1b62-0444-4015-9c02-ff432cc570cd</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,a7ae1b62-0444-4015-9c02-ff432cc570cd.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,a7ae1b62-0444-4015-9c02-ff432cc570cd.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a7ae1b62-0444-4015-9c02-ff432cc570cd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Niks, det er derimod den seneste blog på min rulle. <a href="http://blogs.msdn.com/sqlcat/default.aspx">Microsoft
      SQL Server Development Customer Advisory Team</a> er det mundrette navn på denne forholdsvis
      nye blog med best practices og erfaringer fra nogle af verdens mest krævende SQL Server
      installationer.
   </p>
        <p>
      Mon ikke de fleste af os kan lære lidt når så <a href="http://blogs.msdn.com/sqlcat/archive/2005/08/29/457503.aspx">erfarne
      folk</a> begynder at dele lidt ud?
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=a7ae1b62-0444-4015-9c02-ff432cc570cd" />
      </body>
      <title>SQLCAT - SQL Server service?</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,a7ae1b62-0444-4015-9c02-ff432cc570cd.aspx</guid>
      <link>http://www.sqljoint.com/SQLCAT++SQL+Server+Service.aspx</link>
      <pubDate>Fri, 18 Nov 2005 12:18:39 GMT</pubDate>
      <description>&lt;p&gt;
   Niks, det er derimod den seneste blog på min rulle. &lt;a href="http://blogs.msdn.com/sqlcat/default.aspx"&gt;Microsoft
   SQL Server Development Customer Advisory Team&lt;/a&gt; er det mundrette navn på denne forholdsvis
   nye blog med best practices og erfaringer fra nogle af verdens mest krævende SQL Server
   installationer.
&lt;/p&gt;
&lt;p&gt;
   Mon ikke de fleste af os kan lære lidt når så &lt;a href="http://blogs.msdn.com/sqlcat/archive/2005/08/29/457503.aspx"&gt;erfarne
   folk&lt;/a&gt; begynder at dele lidt ud?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=a7ae1b62-0444-4015-9c02-ff432cc570cd" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,a7ae1b62-0444-4015-9c02-ff432cc570cd.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=991b0b5a-c22d-4758-9e36-5d36d0fffae8</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,991b0b5a-c22d-4758-9e36-5d36d0fffae8.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,991b0b5a-c22d-4758-9e36-5d36d0fffae8.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=991b0b5a-c22d-4758-9e36-5d36d0fffae8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Microsoft tilbyder i hele november 8 gratis eLearning kurser om SQL Server med emner
      som:
   </p>
        <ul>
          <li>
         Installing and Securing Microsoft SQL Server 2005 
      </li>
          <li>
         Programming SQL Server 2005 
      </li>
          <li>
         Creating the Data Access Tier Using Microsoft SQL Server 2005 
      </li>
          <li>
         New Features of Microsoft SQL Server 2005 Analysis Services</li>
        </ul>
        <p>
      Kurserne findes på <a href="https://www.microsoftelearning.com/catalog/default.aspx">https://www.microsoftelearning.com/catalog/default.aspx</a>,
      og kan downloades, så de kan ses offline.
   </p>
        <p>
      Som om det ikke er nok, er der ind til 17. november 7 gratis Visual Studio 2005 kurser,
      som også kan downloades. Efter download har du 90 dage til at få dem set, så det er
      bare med at komme i gang.
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=991b0b5a-c22d-4758-9e36-5d36d0fffae8" />
      </body>
      <title>Gratis Microsoft eLearning om SQL Server 2005</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,991b0b5a-c22d-4758-9e36-5d36d0fffae8.aspx</guid>
      <link>http://www.sqljoint.com/Gratis+Microsoft+ELearning+Om+SQL+Server+2005.aspx</link>
      <pubDate>Fri, 11 Nov 2005 10:46:01 GMT</pubDate>
      <description>&lt;p&gt;
   Microsoft tilbyder i hele november 8 gratis eLearning kurser om SQL Server med emner
   som:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Installing and Securing Microsoft SQL Server 2005 
   &lt;li&gt;
      Programming SQL Server 2005 
   &lt;li&gt;
      Creating the Data Access Tier Using Microsoft SQL Server 2005 
   &lt;li&gt;
      New Features of Microsoft SQL Server 2005 Analysis Services&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Kurserne findes på &lt;a href="https://www.microsoftelearning.com/catalog/default.aspx"&gt;https://www.microsoftelearning.com/catalog/default.aspx&lt;/a&gt;,
   og kan downloades, så de kan ses offline.
&lt;/p&gt;
&lt;p&gt;
   Som om det ikke er nok, er der ind til 17. november 7 gratis Visual Studio 2005 kurser,
   som også kan downloades. Efter download har du 90 dage til at få dem set, så det er
   bare med at komme i gang.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=991b0b5a-c22d-4758-9e36-5d36d0fffae8" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,991b0b5a-c22d-4758-9e36-5d36d0fffae8.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=5b625648-768c-47fe-b29e-b6e433ede026</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,5b625648-768c-47fe-b29e-b6e433ede026.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,5b625648-768c-47fe-b29e-b6e433ede026.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5b625648-768c-47fe-b29e-b6e433ede026</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <span id="lblMessage">
            <span id="lblMessage">
              <span id="lblMessage">
                <span id="lblMessage">
                  <span id="lblMessage">
                    <span id="lblMessage">
                      <span id="lblMessage">En
      hurig måde i Management Studio eller Query Analyzer at få oplysninger om objektet
      tbl_Product i følgende query:</span>
                    </span>
                  </span>
                </span>
              </span>
            </span>
          </span>
        </p>
        <span>
          <span>
            <span>
              <span>
                <span>
                  <span>
                    <span>
                      <p>
                        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                          <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Product</span>
                      </p>
                    </span>
                  </span>
                </span>
              </span>
            </span>
          </span>
        </span>
        <p>
          <span>
            <span>
              <span>
                <span>
                  <span>
                    <span>
                      <span>er at markere objektnavnet og trykke ALT+F1.</span>
                    </span>
                  </span>
                </span>
              </span>
            </span>
          </span>
        </p>
        <p>
          <span>
            <span>
              <span>
                <span>
                  <span>
                    <span>
                      <span>Dette svarer til at eksekvere</span>
                    </span>
                  </span>
                </span>
              </span>
            </span>
          </span>
        </p>
        <span>
          <span>
            <span>
              <span>
                <span>
                  <span>
                    <span>
                      <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                        <p>
                          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SP_HELP
      tbl_Product</span>
                        </p>
                      </span>
                    </span>
                  </span>
                </span>
              </span>
            </span>
          </span>
        </span>
        <p>
          <span>
            <span>
              <span>
                <span>
                  <span>
                    <span>
                      <span>og returnerer alle objektdetaljer, som kolonne
      oplysninger, index information og constraints. </span>
                    </span>
                  </span>
                </span>
              </span>
            </span>
          </span>
        </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=5b625648-768c-47fe-b29e-b6e433ede026" />
      </body>
      <title>Objekt hjælp og keyboard genveje</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,5b625648-768c-47fe-b29e-b6e433ede026.aspx</guid>
      <link>http://www.sqljoint.com/Objekt+Hj%c3%a6lp+Og+Keyboard+Genveje.aspx</link>
      <pubDate>Wed, 09 Nov 2005 15:06:50 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;span id=lblMessage&gt;&lt;span id=lblMessage&gt;&lt;span id=lblMessage&gt;&lt;span id=lblMessage&gt;&lt;span id=lblMessage&gt;&lt;span id=lblMessage&gt;&lt;span id=lblMessage&gt;En
   hurig måde i Management Studio eller Query Analyzer&amp;nbsp;at få oplysninger om objektet
   tbl_Product i følgende query:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Product&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;p&gt;
   &lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;er at markere objektnavnet og trykke ALT+F1.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Dette svarer til at eksekvere&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SP_HELP
   tbl_Product&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;p&gt;
   &lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;og returnerer alle objektdetaljer, som kolonne
   oplysninger, index information og constraints. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=5b625648-768c-47fe-b29e-b6e433ede026" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,5b625648-768c-47fe-b29e-b6e433ede026.aspx</comments>
      <category>SQL Server Management Studio</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=4e48eec6-b168-4962-96cd-8702d5e7d8e5</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,4e48eec6-b168-4962-96cd-8702d5e7d8e5.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,4e48eec6-b168-4962-96cd-8702d5e7d8e5.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4e48eec6-b168-4962-96cd-8702d5e7d8e5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Skal du udvikle noget, som skal kunne afvikles på en tidligere version af SQL Server
      end din udviklingsmaskine, kan du med fordel ændre kompatibilitets niveau. Herved
      kan du sikre at din T-SQL er kompatibel med en tidligere version af SQL Server.
   </p>
        <p>
      Kompatibilitets niveau skiftes på følgende måde:
   </p>
        <p>
          <strong>SQL Server 2000</strong>
          <br />
      Højre klik på den aktuelle database i Enterprise Manager og vælg Properties. Vælg
      tabben Options og du har nu mulighed for at ændre kompatibilitets niveau.
   </p>
        <p>
          <strong>SQL Server 2005</strong>
          <br />
      Højreklik på den aktuelle database i Management Studio og vælg Properties. Vælg siden
      Options, og du har nu mulighed for at ændre kompatibilitets niveau i drop down boksen.
   </p>
        <p>
      Vær opmærksom på at SQL Server 2000 kan sættes til at være kompatibel med versioner
      helt tilbage til SQL Server 6.0, men SQL Server 2005 "kun" går tilbage til 7.0.
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=4e48eec6-b168-4962-96cd-8702d5e7d8e5" />
      </body>
      <title>Skift kompatibilitets niveau på din database</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,4e48eec6-b168-4962-96cd-8702d5e7d8e5.aspx</guid>
      <link>http://www.sqljoint.com/Skift+Kompatibilitets+Niveau+P%c3%a5+Din+Database.aspx</link>
      <pubDate>Wed, 02 Nov 2005 14:34:04 GMT</pubDate>
      <description>&lt;p&gt;
   Skal du udvikle noget, som skal kunne afvikles på en tidligere version af SQL Server
   end din udviklingsmaskine, kan du med fordel ændre kompatibilitets niveau. Herved
   kan du sikre at din T-SQL er kompatibel med en tidligere version af SQL Server.
&lt;/p&gt;
&lt;p&gt;
   Kompatibilitets niveau skiftes på følgende måde:
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;SQL Server 2000&lt;/strong&gt;
   &lt;br&gt;
   Højre klik på den aktuelle database i Enterprise Manager og vælg Properties. Vælg
   tabben Options og du har nu mulighed for at ændre kompatibilitets niveau.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;SQL Server 2005&lt;/strong&gt;
   &lt;br&gt;
   Højreklik på den aktuelle database i Management Studio og vælg Properties. Vælg siden
   Options, og du har nu mulighed for at ændre kompatibilitets niveau i drop down boksen.
&lt;/p&gt;
&lt;p&gt;
   Vær opmærksom på at SQL Server 2000 kan sættes til at være kompatibel med versioner
   helt tilbage til SQL Server 6.0, men SQL Server 2005 "kun" går tilbage til 7.0.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=4e48eec6-b168-4962-96cd-8702d5e7d8e5" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,4e48eec6-b168-4962-96cd-8702d5e7d8e5.aspx</comments>
      <category>SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=84757242-b574-4b86-9397-d5059e77f03b</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,84757242-b574-4b86-9397-d5059e77f03b.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,84757242-b574-4b86-9397-d5059e77f03b.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=84757242-b574-4b86-9397-d5059e77f03b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Default collation på SQL Server er case-insensitive. Det er som oftest også det
      smarteste, så man ikke behøver koncentrere sig om at skrive f.eks. object navne med
      den rigtige case. Ind imellem kunne det dog være rart, hvis man kunne lave en case-sensitive
      WHERE-clause, f.eks. i forbindelse med, at en bruger angiver password til login.
   </p>
        <p>
      Eks:
   </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_User <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> Password
      = <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'superfly'</span></span>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            </span>
          </span>Denne
      returnerer både dem der har password: superfly, Superfly, SUPERFLY og lign., hvilket
      ikke er hensigtsmæssigt.<br />
       <br />
      Følgende lille trick giver til gengæld det ønskede resultat:
   </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> * <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_User <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CONVERT</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BINARY</span>,
      Password) = <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CONVERT</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BINARY</span>, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'superfly'</span>)</span>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          </span>Nu
      vil kun brugere med password superfly blive returneret. Den binære værdi for f.eks.
      s og S er forskellig, så nu risikerer vi ikke at få uønskede rækker returneret.
   </p>
        <p>
      Den betænksomme SQL programmør vil nu gøre opmærksom på, at et evt. index på kolonnen
      Password ikke længere vil kunne anvendes, men at der vil skulle en table-scan til
      for at finde den ønskede brugere.
   </p>
        <p>
      Dette kan man komme ud over med denne færdig SELECT:
   </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> *
      FORM tbl_User <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> Password
      = <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'superfly'</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CONVERT</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BINARY</span>,
      Password) = <span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CONVERT</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">BINARY</span>, <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'superfly'</span>)</span>
        </p>
        <p>
      Et index kan nu anvendes til at finde de brugere, der har password superfly i en elle
      anden form, og til sidst fjernes de brugere, der så ikke har det på den rigtige form
      (den rigtige case).
   </p>
        <p>
      Vores mål er nu nået og vi har lavet en case-sensitive WHERE-clause på en database
      med case-insensitive collation.<br /></p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=84757242-b574-4b86-9397-d5059e77f03b" />
      </body>
      <title>Case-sensitive WHERE clause ved case-insensitive collation</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,84757242-b574-4b86-9397-d5059e77f03b.aspx</guid>
      <link>http://www.sqljoint.com/Casesensitive+WHERE+Clause+Ved+Caseinsensitive+Collation.aspx</link>
      <pubDate>Sun, 30 Oct 2005 20:14:13 GMT</pubDate>
      <description>&lt;p&gt;
   Default collation på SQL Server er&amp;nbsp;case-insensitive. Det er som oftest også det
   smarteste, så man ikke behøver koncentrere sig om at skrive f.eks. object navne med
   den rigtige case. Ind imellem kunne det dog være rart, hvis man kunne lave en case-sensitive
   WHERE-clause, f.eks. i forbindelse med, at en bruger angiver password til login.
&lt;/p&gt;
&lt;p&gt;
   Eks:
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_User &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; Password
   = &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'superfly'&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;/span&gt;&lt;/span&gt;Denne
   returnerer både dem der har password: superfly, Superfly, SUPERFLY og lign., hvilket
   ikke er hensigtsmæssigt.&lt;br&gt;
   &amp;nbsp;&lt;br&gt;
   Følgende lille trick giver til gengæld det ønskede resultat:
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; * &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_User &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CONVERT&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BINARY&lt;/span&gt;,
   Password) = &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CONVERT&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BINARY&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'superfly'&lt;/span&gt;)&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;/span&gt;Nu
   vil kun brugere med password superfly blive returneret. Den binære værdi for f.eks.
   s og S er forskellig, så nu risikerer vi ikke at få uønskede rækker returneret.
&lt;/p&gt;
&lt;p&gt;
   Den betænksomme SQL programmør vil nu gøre opmærksom på, at et evt. index på kolonnen
   Password ikke længere vil kunne anvendes, men at der vil skulle en table-scan til
   for at finde den ønskede brugere.
&lt;/p&gt;
&lt;p&gt;
   Dette kan man komme ud over med denne færdig SELECT:
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; *
   FORM tbl_User &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; Password
   = &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'superfly'&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CONVERT&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BINARY&lt;/span&gt;,
   Password) = &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CONVERT&lt;/span&gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;BINARY&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;'superfly'&lt;/span&gt;)&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   Et index kan nu anvendes til at finde de brugere, der har password superfly i en elle
   anden form, og til sidst fjernes de brugere, der så ikke har det på den rigtige form
   (den rigtige case).
&lt;/p&gt;
&lt;p&gt;
   Vores mål er nu nået og vi har lavet en case-sensitive WHERE-clause på en database
   med case-insensitive collation.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=84757242-b574-4b86-9397-d5059e77f03b" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,84757242-b574-4b86-9397-d5059e77f03b.aspx</comments>
      <category>T-SQL</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=77c7a6f7-4766-4c2f-8f04-a8119da56192</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,77c7a6f7-4766-4c2f-8f04-a8119da56192.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,77c7a6f7-4766-4c2f-8f04-a8119da56192.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=77c7a6f7-4766-4c2f-8f04-a8119da56192</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      SQL Server 2005 Management Studio tilbyder to keyboard skemaer. Nu hvor SQL Server
      arbejdet foregår i en Visual Studio skal, er default meget naturligt baseret herpå.
      Du har dog også mulighed for at vælge et skema kaldet SQL Server 2000, hvis du er
      lidt mere nostalgisk.
   </p>
        <p>
      Det betyder selvfølgelig, at du skal lære nogle nye genveje (i hvert fald hvis du
      vil bruge default skemaet), men hvis du i forvejen også udvikler i Visual
      Studio.NET kommer det hurtigt, og så er det rart ikke at skulle huske to forskellige
      genveje til f.eks. kommentere den valgte tekst ud og ind.
   </p>
        <p>
      Kommenter ud:<br />
      CTRL+SHIFT+C bliver til CTRL+K, CTRL+C
   </p>
        <p>
      Kommenter ind:<br />
      CTRL+SHIFT+R bliver til CTRLl+K, CTRL+U
   </p>
        <p>
          <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_7f8z.asp">Alle
      genveje til SQL Server 2000 Qyery Analyser</a>
        </p>
        <p>
          <a href="http://msdn2.microsoft.com/en-us/library/ms174205#">Alle genveje til SQL
      Server 2005 Management Studio</a>
        </p>
        <p>
      Nå, ja. Hvis dette er den eneste blog, du læser, skulle jeg nok lige sige, at SQL
      Server 2005 og Visual Studio 2005 i dag er kommet til download på MSDN. Hvis dette
      ikke er den eneste blog, du læser, har du nok allerede lukket dette vindue - der er
      grænser for hvor mange gange, man gider læse det samme.
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=77c7a6f7-4766-4c2f-8f04-a8119da56192" />
      </body>
      <title>Keyboard Shortcuts i SQL Server 2005</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,77c7a6f7-4766-4c2f-8f04-a8119da56192.aspx</guid>
      <link>http://www.sqljoint.com/Keyboard+Shortcuts+I+SQL+Server+2005.aspx</link>
      <pubDate>Fri, 28 Oct 2005 13:31:01 GMT</pubDate>
      <description>&lt;p&gt;
   SQL Server 2005 Management Studio tilbyder to keyboard skemaer. Nu hvor SQL Server
   arbejdet foregår i en Visual Studio skal, er default meget naturligt baseret herpå.
   Du har dog også mulighed for at vælge et skema kaldet SQL Server 2000, hvis du er
   lidt mere nostalgisk.
&lt;/p&gt;
&lt;p&gt;
   Det betyder selvfølgelig, at du skal lære nogle nye genveje (i hvert fald hvis du
   vil bruge&amp;nbsp;default skemaet), men hvis du i forvejen også udvikler&amp;nbsp;i Visual
   Studio.NET kommer det hurtigt, og så er det rart ikke at skulle huske to forskellige
   genveje til f.eks. kommentere den valgte tekst&amp;nbsp;ud og ind.
&lt;/p&gt;
&lt;p&gt;
   Kommenter ud:&lt;br&gt;
   CTRL+SHIFT+C bliver til&amp;nbsp;CTRL+K, CTRL+C
&lt;/p&gt;
&lt;p&gt;
   Kommenter ind:&lt;br&gt;
   CTRL+SHIFT+R bliver til&amp;nbsp;CTRLl+K, CTRL+U
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_7f8z.asp"&gt;Alle
   genveje til SQL Server 2000 Qyery Analyser&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://msdn2.microsoft.com/en-us/library/ms174205#"&gt;Alle genveje til SQL
   Server 2005 Management Studio&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   Nå, ja. Hvis dette er den eneste blog, du læser, skulle jeg nok lige sige, at SQL
   Server 2005 og Visual Studio 2005 i dag er kommet til download på MSDN. Hvis dette
   ikke er den eneste blog, du læser, har du nok allerede lukket dette vindue - der er
   grænser for hvor mange gange, man gider læse det samme.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=77c7a6f7-4766-4c2f-8f04-a8119da56192" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,77c7a6f7-4766-4c2f-8f04-a8119da56192.aspx</comments>
      <category>SQL Server Management Studio</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=111ca509-c2e1-44b7-80d0-3c2de021f73d</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,111ca509-c2e1-44b7-80d0-3c2de021f73d.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,111ca509-c2e1-44b7-80d0-3c2de021f73d.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=111ca509-c2e1-44b7-80d0-3c2de021f73d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Som nævnt tidligere er denne blog også lidt at betragte som min digitale hukommelse.
      Efterhånden er jeg ved at have fundet disse SQL statements så mange gange i mine andre
      arkiver, at de er ved at hænge ved. Men måske der er andre, der ikke har så meget
      orden i papirarkiverne som jeg(!?!), og som finde det lettere at slå op på nettet.
      Her kommer 3 metoder til at slette dubletter i en tabel:
   </p>
        <p>
      Vi vil gå ud fra en tabel med personer, som har følgende definition:
   </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">CREATE</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">TABLE</span> tbl_Person
      (<br />
      Id <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INT</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">IDENTITY</span>(1,
      1),<br />
      FirstName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">VARCHAR</span>(50),<br />
      LastName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">VARCHAR</span>(50)<br />
      )</span>
        </p>
        <p>
      og målet er at slette dubletter af kombinationen FirstName og LastName.
   </p>
        <p>
      Metode 1:<br /><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DELETE</span> tbl_Person<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Person <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> P1<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">EXISTS</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span> 1 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Person <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> P2 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> P2.Id
      &gt; P1.Id <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span> P1.FirstName
      = P2.FirstName <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">and</span> P1.LastName
      = P2.LastName)</span></p>
        <p>
      Skeler man til performance er denne metode noget af det mest effektive man kan komme
      op med.
   </p>
        <p>
      Metode 2:<br /><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DELETE</span> P1<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Person <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> P1<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">INNER</span><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">JOIN</span> tbl_Person <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> P2 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ON</span> P1.FirstName
      = P2.FirstName <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> P1.LastName
      = P2.LastName <span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> P1.Id
      &gt; P2.Id</span></p>
        <p>
      Og endelig metode 3:<br /><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">DELETE</span> tbl_Person<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Person <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> P1<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> Id
      &gt; (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">SELECT</span><span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">MIN</span>(Id)<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">FROM</span> tbl_Person <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AS</span> P2<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">WHERE</span> P1.FirstName
      = P2.FirstName<br /><span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AND</span> P1.LastName
      = P2.LastName)</span></p>
        <p>
      Alle tre metoder gør det samme, nemlig sletter dubletter. Som altid når man sletter
      flere rækker er det en god idé at SELECT’e rækkerne ud før man sletter dem, så man
      sikrer at det ser rigtigt ud.
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=111ca509-c2e1-44b7-80d0-3c2de021f73d" />
      </body>
      <title>En klassiker - slet dubletter i en tabel</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,111ca509-c2e1-44b7-80d0-3c2de021f73d.aspx</guid>
      <link>http://www.sqljoint.com/En+Klassiker++Slet+Dubletter+I+En+Tabel.aspx</link>
      <pubDate>Wed, 26 Oct 2005 14:25:13 GMT</pubDate>
      <description>&lt;p&gt;
   Som nævnt tidligere er denne blog også lidt at betragte som min digitale hukommelse.
   Efterhånden er jeg ved at have fundet disse SQL statements så mange gange i mine andre
   arkiver, at de er ved at hænge ved. Men måske der er andre, der ikke har så meget
   orden i papirarkiverne som jeg(!?!), og som finde det lettere at slå op på nettet.
   Her kommer 3 metoder til at slette dubletter i en tabel:
&lt;/p&gt;
&lt;p&gt;
   Vi vil gå ud fra en tabel med personer, som har følgende definition:
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;CREATE&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;TABLE&lt;/span&gt; tbl_Person
   (&lt;br&gt;
   Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;IDENTITY&lt;/span&gt;(1,
   1),&lt;br&gt;
   FirstName &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;VARCHAR&lt;/span&gt;(50),&lt;br&gt;
   LastName &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;VARCHAR&lt;/span&gt;(50)&lt;br&gt;
   )&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   og målet er at slette dubletter af kombinationen FirstName og LastName.
&lt;/p&gt;
&lt;p&gt;
   Metode 1:&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DELETE&lt;/span&gt; tbl_Person&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Person &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; P1&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;EXISTS&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; 1 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Person &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; P2 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; P2.Id
   &amp;gt; P1.Id &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; P1.FirstName
   = P2.FirstName &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;and&lt;/span&gt; P1.LastName
   = P2.LastName)&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   Skeler man til performance er denne metode noget af det mest effektive man kan komme
   op med.
&lt;/p&gt;
&lt;p&gt;
   Metode 2:&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DELETE&lt;/span&gt; P1&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Person &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; P1&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; tbl_Person &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; P2 &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; P1.FirstName
   = P2.FirstName &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; P1.LastName
   = P2.LastName &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; P1.Id
   &amp;gt; P2.Id&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   Og endelig metode 3:&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;DELETE&lt;/span&gt; tbl_Person&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Person &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; P1&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; Id
   &amp;gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;MIN&lt;/span&gt;(Id)&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; tbl_Person &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; P2&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;WHERE&lt;/span&gt; P1.FirstName
   = P2.FirstName&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; P1.LastName
   = P2.LastName)&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   Alle tre metoder gør det samme, nemlig sletter dubletter. Som altid når man sletter
   flere rækker er det en god idé at SELECT’e rækkerne ud før man sletter dem, så man
   sikrer at det ser rigtigt ud.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=111ca509-c2e1-44b7-80d0-3c2de021f73d" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,111ca509-c2e1-44b7-80d0-3c2de021f73d.aspx</comments>
      <category>T-SQL</category>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=73901d67-0911-4b8e-8f56-1f08e7c49a49</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,73901d67-0911-4b8e-8f56-1f08e7c49a49.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,73901d67-0911-4b8e-8f56-1f08e7c49a49.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=73901d67-0911-4b8e-8f56-1f08e7c49a49</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Så skete det! Efter længere tids moderat (fysisk(?)) pres fik jeg endelig presset
      min kollega, <a href="http://www.publicvoid.dk">Søren Lund</a>, til at sætte
      dasBlog op til mig, så jeg kan få gang i SQLJoint igen. Hermed er jeg også klar til
      at tage skridtet ind i det 21. århundrede - det var ved at blive lidt ensomt tilbage
      i den 20.
   </p>
        <p>
      Sitet vil hovedsagelige komme til at indeholde posts, der på den ene eller anden måde
      har med SQL Server at gøre: T-SQL, DTS, Integration Services, Analysis Services osv.
      Skulle jeg falde over et andet udvikler relateret trick, kunne det også ske at finde
      vej til denne digitale udgave af min hukommelse. Endelig kan det ikke udelukkes, at
      der vil snige sig en enkelt eller to komplet irrelevante - set med SQL Server eller
      udvikler øjne - posts ind.
   </p>
        <p>
      - Sune
   </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=73901d67-0911-4b8e-8f56-1f08e7c49a49" />
      </body>
      <title>Velkommen til SQLJoint</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,73901d67-0911-4b8e-8f56-1f08e7c49a49.aspx</guid>
      <link>http://www.sqljoint.com/Velkommen+Til+SQLJoint.aspx</link>
      <pubDate>Tue, 25 Oct 2005 17:45:14 GMT</pubDate>
      <description>&lt;p&gt;
   Så skete det! Efter længere tids moderat (fysisk(?)) pres fik jeg endelig presset
   min kollega, &lt;a href="http://www.publicvoid.dk"&gt;Søren Lund&lt;/a&gt;,&amp;nbsp;til at sætte
   dasBlog op til mig, så jeg kan få gang i SQLJoint igen. Hermed er jeg også klar til
   at tage skridtet ind i det 21. århundrede - det var ved at blive lidt ensomt tilbage
   i den 20.
&lt;/p&gt;
&lt;p&gt;
   Sitet vil hovedsagelige komme til at indeholde posts, der på den ene eller anden måde
   har med SQL Server at gøre: T-SQL, DTS, Integration Services, Analysis Services osv.
   Skulle jeg falde over et andet udvikler relateret trick, kunne det også ske at finde
   vej til denne digitale udgave af min hukommelse. Endelig kan det ikke udelukkes, at
   der vil snige sig en enkelt eller to komplet irrelevante - set med SQL Server eller
   udvikler øjne - posts ind.
&lt;/p&gt;
&lt;p&gt;
   - Sune
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=73901d67-0911-4b8e-8f56-1f08e7c49a49" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,73901d67-0911-4b8e-8f56-1f08e7c49a49.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://www.sqljoint.com/Trackback.aspx?guid=b705c37b-b47f-4e8d-8f8b-091efc4cb684</trackback:ping>
      <pingback:server>http://www.sqljoint.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.sqljoint.com/PermaLink,guid,b705c37b-b47f-4e8d-8f8b-091efc4cb684.aspx</pingback:target>
      <dc:creator>sdh@vertica.dk (Sune Hansen)</dc:creator>
      <wfw:comment>http://www.sqljoint.com/CommentView,guid,b705c37b-b47f-4e8d-8f8b-091efc4cb684.aspx</wfw:comment>
      <wfw:commentRss>http://www.sqljoint.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b705c37b-b47f-4e8d-8f8b-091efc4cb684</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Be sure to visit all the options undfer "Configuration" in the Admin Menu Bar above.
      There are 16 themes to choose from, and you can also create your own.
   </p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=b705c37b-b47f-4e8d-8f8b-091efc4cb684" />
      </body>
      <title>Congratulations, you've installed DasBlog!</title>
      <guid>http://www.sqljoint.com/PermaLink,guid,b705c37b-b47f-4e8d-8f8b-091efc4cb684.aspx</guid>
      <link>http://www.sqljoint.com/Congratulations+Youve+Installed+DasBlog.aspx</link>
      <pubDate>Wed, 20 Jul 2005 07:00:00 GMT</pubDate>
      <description>
		&lt;p&gt;
   Be sure to visit all the options undfer "Configuration" in the Admin Menu Bar above.
   There are 16 themes to choose from, and you can also create your own.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sqljoint.com/aggbug.ashx?id=b705c37b-b47f-4e8d-8f8b-091efc4cb684" /&gt;</description>
      <comments>http://www.sqljoint.com/CommentView,guid,b705c37b-b47f-4e8d-8f8b-091efc4cb684.aspx</comments>
      <category>dasBlog</category>
    </item>
  </channel>
</rss>