<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Home on Janne Anttila</title>
    <link>https://janneaa.com/</link>
    <description>Recent content in Home on Janne Anttila</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Mon, 12 May 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://janneaa.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Listing all the permissions in an Azure SQL Database</title>
      <link>https://janneaa.com/posts/listing-all-the-permissions-in-an-azure-sql-database/</link>
      <pubDate>Mon, 12 May 2025 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/listing-all-the-permissions-in-an-azure-sql-database/</guid>
      
      <description>The most common methods of giving permissions in an Azure SQL Database</description>
      
    </item>
    
    <item>
      <title>Creating a blog with Hugo and Cloudflare Pages</title>
      <link>https://janneaa.com/posts/creating-a-blog-with-hugo-and-cloudflare-pages/</link>
      <pubDate>Wed, 19 Mar 2025 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/creating-a-blog-with-hugo-and-cloudflare-pages/</guid>
      
      <description>In this guide I&amp;rsquo;ll go through the steps required to create a Hugo blog hosted on Cloudflare.</description>
      
    </item>
    
    <item>
      <title>Hello world, again!</title>
      <link>https://janneaa.com/posts/hello-world-again/</link>
      <pubDate>Mon, 24 Feb 2025 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/hello-world-again/</guid>
      
      <description>&lt;figure class=&#34;float-right no-border&#34; style=&#34;width: 210px;&#34;&gt;
      &lt;img src=&#34;https://janneaa.com/images/blog-launch_hu_d39a355eb7b2c366.webp&#34; alt=&#34;Blog launch&#34; loading=&#34;lazy&#34; /&gt;
      
    &lt;/figure&gt;
  

&lt;p&gt;Well I guess it&amp;rsquo;s that time of the decade when I rebuild my blog again. 😁&lt;/p&gt;
&lt;p&gt;I wasn&amp;rsquo;t very active on the last attempt but I&amp;rsquo;ll try to be more consistent this time with posting here. I rebuilt the site on Hugo and Cloudflare Pages with GitHub integration. The content is written in Obsidian. I might do a more detailed post on the setup later.&lt;/p&gt;
&lt;p&gt;Welcome!&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Combining result strings in SQL Server</title>
      <link>https://janneaa.com/posts/combining-result-strings-in-sql-server/</link>
      <pubDate>Mon, 09 Nov 2015 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/combining-result-strings-in-sql-server/</guid>
      
      <description>&lt;p&gt;This is just a quick tip on combining (aggregating) result strings in SQL Server. Sometimes it&amp;rsquo;s useful to add multivalued columns to results (or CSV files) but it&amp;rsquo;s not all that simple.&lt;/p&gt;
&lt;p&gt;For combining results of a JOIN to a single column you can use the &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/t-sql/functions/stuff-transact-sql&#34;&gt;STUFF&lt;/a&gt; function. Credit for this one goes to &lt;a href=&#34;https://stackoverflow.com/a/17591536&#34;&gt;Devart&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      m.maskid,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      m.maskname,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      m.schoolid,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      s.schoolname,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      maskdetail &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; STUFF((
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; md.maskdetail
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; dbo.maskdetails md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;WHERE&lt;/span&gt; m.maskid &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; md.maskid
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;FOR&lt;/span&gt; XML PATH(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;), &lt;span style=&#34;color:#66d9ef&#34;&gt;TYPE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ).value(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;.&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;NVARCHAR(MAX)&amp;#39;&lt;/span&gt;), &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      )
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; dbo.tblmask m
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;JOIN&lt;/span&gt; dbo.school s &lt;span style=&#34;color:#66d9ef&#34;&gt;ON&lt;/span&gt; s.ID &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; m.schoolid
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;ORDER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;BY&lt;/span&gt; m.maskname
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will produce a nice column with a value like &lt;em&gt;&amp;ldquo;value1, value2, value9&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Fixing misplaced SQL Server database files</title>
      <link>https://janneaa.com/posts/fixing-misplaced-sql-server-database-files/</link>
      <pubDate>Thu, 08 Oct 2015 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/fixing-misplaced-sql-server-database-files/</guid>
      
      <description>&lt;p&gt;&lt;img src=&#34;https://janneaa.com/images/sql.jpg#float-right&#34; alt=&#34;SQL (by John Carter, https://www.flickr.com/photos/therefromhere)&#34;&gt;
Recently I was moving a SQL Server model database log file to another disk. I made an &lt;code&gt;ALTER DATABASE [model]  MODIFY FILE...&lt;/code&gt; command a bit too fast and pasted the destination from a file browser window. Of course this set the &lt;em&gt;log directory&lt;/em&gt; as the new log file (&amp;hellip;\MSSQL\Data).&lt;/p&gt;
&lt;p&gt;I also restarted the instance before realizing my mistake, so now it wouldn&amp;rsquo;t start. How to &lt;strong&gt;fix this&lt;/strong&gt;? Well I tried renaming the data folder and then renaming the data file to the folder&amp;rsquo;s original name &lt;em&gt;Data&lt;/em&gt;. This didn&amp;rsquo;t solve the problem.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Searching and replacing text in T-SQL</title>
      <link>https://janneaa.com/posts/searching-and-replacing-text-in-t-sql/</link>
      <pubDate>Sun, 16 Nov 2014 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/searching-and-replacing-text-in-t-sql/</guid>
      
      <description>&lt;p&gt;&lt;img src=&#34;https://janneaa.com/images/database.png#float-right&#34; alt=&#34;Database&#34;&gt;
I recently started learning and using &lt;strong&gt;T-SQL&lt;/strong&gt; for a database integration project I&amp;rsquo;m doing at work. T-SQL (or &lt;em&gt;Transact-SQL&lt;/em&gt;) is Microsoft&amp;rsquo;s extension to SQL that adds some transactional programming features to it. It&amp;rsquo;s used in SQL Server.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m slowly getting the hang of it. Mostly I&amp;rsquo;ve stumbled with the fact that it&amp;rsquo;s not quite a &amp;ldquo;real&amp;rdquo; programming language. So if you think of doing a &lt;em&gt;foreach&lt;/em&gt; loop then you better think again and adjust your mindset to using SQL result sets.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Setting up this site with Pelican (old)</title>
      <link>https://janneaa.com/posts/setting-up-this-site-with-pelican/</link>
      <pubDate>Sat, 25 Oct 2014 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/setting-up-this-site-with-pelican/</guid>
      
      <description>&lt;p&gt;&lt;img src=&#34;https://janneaa.com/images/molumen_Flying_pelican.png#float-right&#34; alt=&#34;Pelican&#34;&gt;
&lt;em&gt;This is from my old blog.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I finally restarted my blog with an actual domain and a switch from Drupal to the &lt;a href=&#34;http://docs.getpelican.com/en/&#34;&gt;Pelican&lt;/a&gt; static blog generator. The server uses Fedora 20 and is hosted by &lt;a href=&#34;https://www.digitalocean.com&#34;&gt;DigitalOcean&lt;/a&gt;. It&amp;rsquo;s a good hosting company with excellent pricing.&lt;/p&gt;
&lt;p&gt;This post is mostly just a list of the steps required to setup this site. Just in case I might need to reinstall it at some point.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Drupal tip: Add your own fields to Solr search index</title>
      <link>https://janneaa.com/posts/drupal-tip-add-your-own-fields-to-solr-search-index/</link>
      <pubDate>Sat, 14 Jan 2012 00:00:00 +0000</pubDate>
      
      <guid>https://janneaa.com/posts/drupal-tip-add-your-own-fields-to-solr-search-index/</guid>
      
      <description>&lt;p&gt;&lt;img src=&#34;https://janneaa.com/images/drupal-solr.png#float-right&#34; alt=&#34;Drupal and Solr&#34;&gt;
Drupal 7 is the PHP content management system that needs no introduction. But if you also want an excellent search engine to use with it then &lt;a href=&#34;http://lucene.apache.org/solr/&#34;&gt;Apache Solr&lt;/a&gt; is the best choice. Solr builds on Lucene and adds some nice features on top of it.&lt;/p&gt;
&lt;p&gt;There is a very good &lt;a href=&#34;https://drupal.org/project/apachesolr&#34;&gt;Drupal module&lt;/a&gt; to integrate the search engine with. It simplifies the Solr installation and adds most of the basic node fields into search index by default. But what about when you need to &lt;strong&gt;define your own fields&lt;/strong&gt;?&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
