regex

Hierarchical Data in a Relational Table

Flatten Hierarchical Data using a Single SQL

Oracle has some neat ways of handling hierarchical data. A while back I wrote about how 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 […]

Read the Full Article →
Thumbnail image for How to 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 username@example.com. The SQL will verify that the email address provided fits into […]

Read the Full Article →
Thumbnail image for Regular Expressions in Oracle Made Easy

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 […]

Read the Full Article →