Wednesday, June 28, 2017

Binding parameters for Oracle INTERVAL Literals

If you've ever tried to use the Perl DBI to execute a SQL statement like this:

select sysdate + interval '1' month from dual

...and wanted to make the interval a parameter, you may have tried various permutations, gotten frustrated and just injected a string into the query.  There is a solution...