Hierarchical Data in a Relational Table

Flatten Hierarchical Data using a Single SQL

Oracle has some neat ways of handling hierarchical data. A single Oracle SQL can find the entire tree of data above or below a node in a hierarchy using the CONNECT BY clause. What if the requirement is to flatten hierarchical data? For example, given a table containing the employee reporting hierarchy of an organization […]

Read the Full Article →
Validate Email Address in SQL

How to Validate Email Address in SQL

In applications that take user email id as input, there is a need to check for email id validity. Here is a very easy validation for syntax of an email address, using regular expressions in Oracle SQL. The basic email address format is The SQL will verify that the email address provided fits into […]

Read the Full Article →
Regular Expressions in Oracle

Regular Expressions in Oracle Made Easy

What is a regular expression? A regular expression (also called regex or regexp for short) is a sequence of characters that describes a pattern in text. Some examples of regular expressions: p..t => A dot stands for a single character. This regular expression will match words that start with a ‘p’, end with a ‘t’ […]

Read the Full Article →