The outstanding Emacs Org-mode enables you to include source code blocks our text. Org-Babel then enables you to execute that code. Yesterday I came across the Orgmode cookbook. In a section it shows how to write a SQL statement and execute it agains a postgresql database. Very nice I thought, but what about Oracle DB?…
Schlagwort: sql
The Oracle DB function „add_months“ adds a given number of months to a given date: SQL> select add_months(to_date(‚04.03.14′,’dd.mm.yy‘),1) as result from dual; RESULT ——– 04.04.14 Nice. But what about 2014-02-28 plus 1 month? SQL> select add_months(to_date(‚28.02.14′,’dd.mm.yy‘),1) as result from dual; RESULT ——– 31.03.14 Ups. It turns out that (quote from documentation) If date is the…