Character and text data are such an integral component of data that most all programming languages provide many functions, constructs, and even libraries to help process text data. I recently used the Oracle SQL INSTR() function in some text-parsing queries. However, these queries were not standalone INSTR() only. INSTR() is also quite powerful as a parameter for other string functions, namely SUBSTR(), in this example. Continue reading to learn more…
(more…)SQL Developer
SQL Joins – A Simple Guide
If you are working with SQL relational databases, at some point you are going to use JOINs. Normalized data is organized and spread across multiple tables, oftentimes linked by a common column key (or multiple keys). We use JOINs to bring the data together. Therefore JOINs are an important concept to grasp. There are SQL JOIN articles and guides across the internet far and wide and I am adding one more into the mix…
(more…)How to use the LEAD() Window Function and discover gaps in Dates
Many of you may know that I am an avid walker. I enjoy walking and hiking for the health and mental benefits. I’m also finicky about the footwear I wear on my walks. I recently used the LEAD() Window function on some of the walking data I track and discovered gaps in the ranges of dates that I wore a particular brand of shoe. Continue reading and see the example queries I came up with to solidify learning concepts about LEAD()…
(more…)How to re-order a comma-separated list in Oracle SQL
Suppose you have a comma-separated list composed of numbers and you want it sorted in order from smallest to largest. Continue reading and see a working example I came up with as I continue studying Oracle SQL…
(more…)RECURSIVE CTE Fun with SUBSTRING() in MySQL
Although I primarily work with MySQL/MariaDB these days on back-end web development projects, I am studying Oracle SQL with the end goal to become certified. I recently watched a great YouTube video and decided to try my hand porting over the Oracle SQL queries to comparable MySQL for a learning exercise. This blog post details the queries I came up with for the end results. Continue reading for some fun recursive CTE’s using the SUBSTRING() character function and interesting output display variations.
(more…)