Developer Sam
  • Blog
  • About
  • Public Speaking

#100CodeExamples

#100CodeExamples

Order To The Chaos – with PL/SQL Collections

PL/SQL provides three different types of collections to hold multiple items of data. They all come with different capabilities and limitations and since these are hard to remember, I provide a condensed showcase of the different collection types in one single code example.

By Sam, 1 monthFebruary 24, 2023 ago
#100CodeExamples

Deeply Nested XML and JSON with SQL

I already wrote about how much I like the XML generating capabilities of modern SQL, but most examples come only with one or two levels of depth.
What if you want to create deeply nested XML and JSON directly from SQL?

By Sam, 1 monthFebruary 16, 2023 ago
#100CodeExamples

Get a list of Quarters by Year with Recursive CTEs (WITH-clause)

Recursive CTEs (WITH-clause) is one addition to the SQL standard that makes the language incredibly powerful. Besides other things it can be used to generate data rows “from thin air” – for example a list of quarters by year.
SQL is your friend!

By Sam, 2 monthsFebruary 10, 2023 ago
#100CodeExamples

XML-Generation in SQL with Namespaces

One of my favorite features of (Oracle-)SQL is how easy it is to turn relational data into other data formats like JSON or XML.
But what if you need to add a namespace to some of the nodes in your generated XML?
I struggled with that until I made a realization about the nature of the xlmns part in XML.

By Sam, 2 monthsFebruary 3, 2023 ago
#100CodeExamples

Dead easy NULL-aware comparison in Oracle with DECODE

One of the probably most unnerving things in databases is dealing with NULLs, especially when comparing data. The necessary logic to deal with NULLs can lead to very verbose code – but if you’re using Oracle, there is a very neat function you can use.

By Sam, 2 monthsJanuary 16, 2023 ago
#100CodeExamples

Version-String Handling with PL/SQL

Wrapping some functionality into a nice little PL/SQL package can make your life so much easier.
I demonstrate this with a small utility-package to deal with Version-Strings.

By Sam, 9 monthsJuly 1, 2022 ago
#100CodeExamples

Sort a Version-String with pure SQL

Ever tried to sort Version-Strings with pure SQL – for example when you want to find the highest Flyway version installed in your database?
Let me show you how you can!

By Sam, 2 yearsJuly 15, 2021 ago
#100CodeExamples

Split a String into Rows – Revisited

My previous solution to split a string into rows by a delimiter, using pure SQL had a couple of small flaws.
Here is the revisited version that also removes a bit of code duplication.

By Sam, 2 yearsJune 22, 2021 ago
#100CodeExamples

Split a String into Rows by Delimiter (with Pure SQL)

Sometimes we have data that is not split into columns and rows, but SQL can only really thrive on structured data.
But thanks to recursive queries we can split any string into rows – with pure SQL.

By Sam, 2 yearsMarch 12, 2021 ago
Image by Andrew Martin from Pixabay
#100CodeExamples

PL/SQL Subtype Constraints don’t work from SQL

It is a common practice to eliminate possible NULL values from your method’s parameters, and in the past I advocated to use subtypes to do this in PL/SQL.
However, it doesn’t work from SQL…

By Sam, 2 yearsFebruary 10, 2021 ago

Posts navigation

1 2 … 4 Next
Tags
#100CodeExamples AdventOfCode2020 Agile APEXConnect Charset CheatSheet Clarity Clean Code Compassione Coding Conferences Continuous Integration Decision Making DesignRules DOAG Don't Repeat Yourself Dunning-Kruger-effect EDD Empathy Evolutionary Fun JavaScript Learning Life Migration MINUS Oracle OracleACE Personal Growth PL/SQL Public Talking Puzzle Readability Reflection Self-Awareness Self-Testing Software Design Software Quality Speaking SQL SQL Types TDD Team Testing Unit-Testing utPLSQL
Categories
  • #100CodeExamples
  • Advent Of Code 2020
  • BeckDesignRules
  • Book Club
  • Fun
  • Humans
  • Java
  • Oracle ACE
  • PL/SQL
  • Programming Concepts
  • Public Speaking
  • Reflections
  • SQL
  • Testing
  • Tooling
  • Uncategorized
  • utPLSQL
Archives
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • July 2022
  • May 2022
  • December 2021
  • July 2021
  • June 2021
  • March 2021
  • February 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • April 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • September 2018
  • August 2018
  • June 2018
  • May 2018
  • March 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • May 2016
  • Imprint / Impressum
  • Contact
Hestia | Developed by ThemeIsle