Developer Sam
  • Blog
  • About
  • Public Speaking

#100CodeExamples

#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 weeksJanuary 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, 7 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
#100CodeExamples

Well-Testable Code: Dealing with the “Popular Sith”-Sequence

My last example of controlling a sequence to test some default-behavior was not “well-testable” PL/SQL code.
In this example I show how we can achieve a method that is much easier to test, doesn’t require touching internals – all without changing the public API of the method.

By Sam, 3 years ago
#100CodeExamples

utPLSQL and ORA-04061 – Global State and Package Invalidation

A combination of Package global state and Package invalidation can easily lead to ORA-04061 errors, especially in unit-testing situations.
This blog-post explains the problem and shows possible solutions (all with examples)

By Sam, 3 years ago
#100CodeExamples

Let Tests Tell a Story With utPLSQL Nested Contexts

Unit-Tests are automated checks of certain behavior. But what if we could also use them to describe what the functionality they’re checking is supposed to do?

By Sam, 3 years ago
#100CodeExamples

OGB Appreciation Day: Explore a utPLSQL test scenario with “force-manual-rollback”

How to explore some functionality you don’t know but want to change or improve?
Write a unit test with utPLSQL and use the force-manual-rollback param!
#ThanksOGB

By Sam, 3 years ago

Posts navigation

1 2 3 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
  • 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