<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>SQL on The Lars Breddemann Blog</title><link>https://0608fde9.lbreddemann-blog.pages.dev/category/sql/</link><description>Recent content in SQL on The Lars Breddemann Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 30 Dec 2025 04:44:36 +0000</lastBuildDate><atom:link href="https://0608fde9.lbreddemann-blog.pages.dev/category/sql/feed.xml" rel="self" type="application/rss+xml"/><item><title>Advanced Database magic with Tableau</title><link>https://0608fde9.lbreddemann-blog.pages.dev/advanced-database-magic-with-tableau/</link><pubDate>Tue, 30 Dec 2025 04:44:36 +0000</pubDate><guid isPermaLink="false">https://lbreddemann.org/?p=2373</guid><description>&lt;p&gt;Some time ago I needed a way to control how long a database query would (at least) take. The purpose for this was to test out timeout behaviour of components that trigger and wait for the query result.&lt;br&gt;
While the specifics of this testing purpose are not really that interesting, I learned quite a bit while implementing my &amp;quot; &lt;em&gt;wait for a query as long as I like&amp;quot;&lt;/em&gt; solution.&lt;/p&gt;</description></item><item><title>Tableau repository schedules decoded</title><link>https://0608fde9.lbreddemann-blog.pages.dev/tableau-repository-schedules-decoded/</link><pubDate>Fri, 04 Aug 2023 07:55:06 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=2244</guid><description>&lt;p&gt;Something (hopefully useful) for the all the Tableau repository warriors:&lt;br&gt;
Table &lt;code&gt;schedules&lt;/code&gt; holds, as the name implies, the definition of &lt;strong&gt;&lt;a href="https://tableau.github.io/tableau-data-dictionary/2023.1/data_dictionary.htm#public.schedules_anchor"&gt;schedules&lt;/a&gt;&lt;/strong&gt; in Tableau Server.&lt;br&gt;
Unfortunately for the SQL user, the information about which day of the week and which day of a month a schedule should trigger an action are encoded in two &lt;code&gt;number&lt;/code&gt; columns via binary encoding.&lt;br&gt;
So, e.g. if the right-most bit of the value in &lt;code&gt;day_of_week_mask&lt;/code&gt; is set, then this schedule triggers stuff on a Sunday.&lt;/p&gt;</description></item><item><title>SAP Factory Calendar in Snowflake</title><link>https://0608fde9.lbreddemann-blog.pages.dev/sap-factory-calendar-in-snowflake/</link><pubDate>Thu, 04 May 2023 08:52:07 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=2165</guid><description>&lt;p&gt;Analysing the data in SAP systems can be done in many ways. While SAP would like all customers to use the tools from their portfolio, many customers prefer to use other platforms. Snowflake is arguably one of the most popular choices for that.
If getting the SAP tables into a different data platform would be all that is needed to start writing SQL queries and getting answers, I suspect a lot more SAP customers would move their analytics stack. Alas, it is not that easy at all.
SAP&amp;rsquo;s database design is peculiar and littered with design choices from decades long past, when saving a few bytes in storage could greatly improve the system&amp;rsquo;s performance or reduce it&amp;rsquo;s resource consumption.&lt;/p&gt;</description></item><item><title>Answers Pinboard</title><link>https://0608fde9.lbreddemann-blog.pages.dev/answers-pinboard/</link><pubDate>Mon, 19 Dec 2022 04:33:45 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=1937</guid><description>&lt;p&gt;Apart from writing blog posts I have written answers to many questions on several Q&amp;amp;A sites like &lt;a href="https://stackoverflow.com/questions/tagged/hana"&gt;StackOverflow&lt;/a&gt; and &lt;a href="https://answers.sap.com/tags/73554900100700000996"&gt;SAP Community&lt;/a&gt;. Some of those answers received good feedback and/or the answer surprised me once I worked it out.&lt;/p&gt;</description></item><item><title>SAP HANA middle of the road for Big Data or just average?</title><link>https://0608fde9.lbreddemann-blog.pages.dev/sap-hana-middle-of-the-road-for-big-data-or-just-average/</link><pubDate>Sun, 14 Aug 2022 12:41:02 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=2068</guid><description>&lt;p&gt;When SAP tries to explain HANA as a technology the buzz words &amp;ldquo;Big Data&amp;rdquo; have always been part of the story.&lt;br&gt;
Commonly &amp;ldquo;Big Data with HANA&amp;rdquo; then gets specified to mean one or another thing - often to caveat what the platform is supposed to be able to do and which usage scenarios require what sort of special handling.&lt;/p&gt;</description></item><item><title>Write better SQL!</title><link>https://0608fde9.lbreddemann-blog.pages.dev/write-better-sql/</link><pubDate>Sat, 03 Apr 2021 07:40:46 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=1832</guid><description>&lt;p&gt;When reading &lt;a href="https://blog.nelhage.com/post/some-opinionated-sql-takes/"&gt;Some opinionated thoughts on SQL databases&lt;/a&gt; recently, I felt reminded of an observation that I have made in the past: the way SQL is commonly used and presented is way too low-level.&lt;/p&gt;</description></item><item><title>Separate business logic from tables and avoid dynamic SQL</title><link>https://0608fde9.lbreddemann-blog.pages.dev/separate-business-logic-from-tables-and-avoid-dynamic-sql/</link><pubDate>Sun, 15 Nov 2020 06:18:51 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=1745</guid><description>&lt;h2 id="real-programming"&gt;Real programming &lt;a class="heading-anchor" href="#real-programming" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the aspects of doing &amp;ldquo;actual&amp;rdquo; programming is to &lt;em&gt;automate&lt;/em&gt; computations. Making the computer do things not just once, say by running a calculation on the October sales data, but to do it over and over again on any months&amp;rsquo; sales data.&lt;/p&gt;</description></item><item><title>How to engineer your DB code</title><link>https://0608fde9.lbreddemann-blog.pages.dev/how-to-engineer-your-db-code/</link><pubDate>Mon, 05 Oct 2020 00:25:17 +0000</pubDate><guid isPermaLink="false">https://www.lbreddemann.org/?p=1599</guid><description>&lt;h2 id="a-journey-of-1000-miles"&gt;A journey of 1000 miles&amp;hellip; &lt;a class="heading-anchor" href="#a-journey-of-1000-miles" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We are developers. We make the modern world tick and create tools for information workers. We are computer scientists, IT experts, and coders, and we call ourselves engineers. We even renamed a part of our industry &amp;ldquo;software engineering&amp;rdquo; to get one step closer to this aspirational goal of being professionals when doing our jobs.&lt;/p&gt;</description></item><item><title>SAP Online Track 2020</title><link>https://0608fde9.lbreddemann-blog.pages.dev/sap-online-track-2020/</link><pubDate>Tue, 02 Jun 2020 05:10:02 +0000</pubDate><guid isPermaLink="false">https://lbreddemann.org/?p=1472</guid><description>&lt;p&gt;On the last weekend in May, just a few days ago, the &lt;a href="https://saponlinetrack.github.io/"&gt;SAP Online Track&lt;/a&gt; was held. A volunteer-driven, online developer, and user event around SAP technology.&lt;/p&gt;
&lt;p&gt;https://twitter.com/Sygyzmundovych/status/1250811896737005570&lt;/p&gt;
&lt;p&gt;A friendly nudge from &lt;a href="https://people.sap.com/vitaliy.rudnytskiy"&gt;Vitaliy Rudnicki (SAP)&lt;/a&gt; on twitter in April made me check if I could manage to come up with a talk and write and record it in time for the event. Obviously, this worked out, otherwise, you wouldn&amp;rsquo;t be reading about it now.&lt;/p&gt;</description></item><item><title>Find the ONE ... or the other</title><link>https://0608fde9.lbreddemann-blog.pages.dev/find-the-one-or-the-other/</link><pubDate>Mon, 27 Apr 2020 04:05:27 +0000</pubDate><guid isPermaLink="false">https://lbreddemann.org/?p=1450</guid><description>&lt;p&gt;In his recent blog post &amp;quot; &lt;strong&gt;&lt;a href="https://blogs.sap.com/2020/04/25/code-pushdown/"&gt;Code Pushdown&lt;/a&gt;&lt;/strong&gt;&amp;quot;&lt;a href="https://people.sap.com/paul.hardy2"&gt;Paul Hardy&lt;/a&gt;, a long-time SAP community contributor described his first foray into HANA SQLScript programming.&lt;/p&gt;
&lt;p&gt;Paul picked a very ABAP-y problem to solve:&lt;br&gt;
Finding records with &lt;strong&gt;fallback to a default value.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Using new features not supported?!</title><link>https://0608fde9.lbreddemann-blog.pages.dev/using-new-features-not-supported/</link><pubDate>Sat, 04 Apr 2020 04:06:02 +0000</pubDate><guid isPermaLink="false">https://lbreddemann.org/?p=1435</guid><description>&lt;p&gt;A recent &lt;a href="https://answers.sap.com/questions/13013930/calculate-using-a-previous-rows-calculated-value-o.html"&gt;question&lt;/a&gt; in the HANA Q&amp;amp;A forum brought up an error message that I recently encountered myself.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Modification of table variable is &lt;span style="color:#f92672"&gt;not&lt;/span&gt; supported &lt;span style="color:#f92672"&gt;in&lt;/span&gt; current SQLScript configuration
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The way to produce this error is to&lt;/p&gt;</description></item><item><title>Matchmaker - quick quick?</title><link>https://0608fde9.lbreddemann-blog.pages.dev/matchmaker-quick-quick/</link><pubDate>Thu, 26 Mar 2020 05:07:37 +0000</pubDate><guid isPermaLink="false">https://lbreddemann.org/?p=1402</guid><description>&lt;p&gt;In &lt;a href="https://0608fde9.lbreddemann-blog.pages.dev/matchmaker/"&gt;Matchmaker&lt;/a&gt;, I developed a solution to a not-so-obvious problem.&lt;/p&gt;
&lt;p&gt;The solution worked and delivered the right answer - finding documents where the line items match to a certain degree the line items of a reference document.&lt;/p&gt;</description></item><item><title>Matchmaker</title><link>https://0608fde9.lbreddemann-blog.pages.dev/matchmaker/</link><pubDate>Thu, 26 Mar 2020 05:07:31 +0000</pubDate><guid isPermaLink="false">https://lbreddemann.org/?p=1386</guid><description>&lt;p&gt;SQL is an easy language to learn. A few commands to learn ( &lt;code&gt;SELECT/FROM/WHERE/GROUP BY&lt;/code&gt;) and you are good to go.&lt;/p&gt;
&lt;p&gt;One downside of the simple syntax and small vocabulary is that it can lead many SQL users to the assumption that these building blocks are all that can be expressed with SQL.&lt;/p&gt;</description></item><item><title>Starting off with a classic…</title><link>https://0608fde9.lbreddemann-blog.pages.dev/starting-off-with-a-classic/</link><pubDate>Tue, 13 Feb 2007 14:00:09 +0000</pubDate><guid isPermaLink="false">http://lbreddemann.org/?p=370</guid><description>&lt;p&gt;Every now and then a new version of the database software comes along. Upgrades of Oracle or MaxDB often include major improvements concerning stability and performance. These improvements can and should be read as: things run different now.&lt;/p&gt;</description></item></channel></rss>