Browsing articles tagged with " SQL"
May
31
2011

Calculating Age Based on Date of Birth in SQLite

On a recent project I needed to calculate a person’s age relative to the system date based on an input value of a birth date.  In this particular scenario I needed to do so using the SQLite engine, and the specific requirement was to calculate age using the following logic: If person is younger than 1 month, present the age in days (e.g. 30 days) If person is 1 month or older but younger than [...]

Aug
24
2010

How to Make a Long Running Query

Recently a colleague sent me a quick instant message asking if I knew of any way in Oracle to make a query run long enough to test a “cancel query” function he was writing in Java.  He had tried several queries that usually produced the results he was looking for, however there wasn’t enough data in his test environment to reproduce the wait time he needed.  I thought about it for a minute and then [...]

Pages