Create Table Structure From Existing Table in Oracle SQL

Do you need the same table structure as an existing table in your database, but empty of rows? Oracle SQL’s CREATE TABLE AS statement achieves this easily. Continue reading and learn how with a simple example…

(more…)

Export Query Results to CSV with SQL Developer

One of the most universal data interchange formats in the world is the CSV file. Data professionals use CSV’s without a thought. Equally, those not even in the ‘data field’ use CSV’s on a daily basis. Do you have the SQL query results for that report and need to share them in CSV format? Using the Oracle SQL Developer IDE, it is a breeze…

(more…)

SQL INSTR() Function – Medium Cross Post

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 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…)