Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Testing and database date functions

by iburrell (Chaplain)
on Dec 09, 2004 at 21:29 UTC ( [id://413691] : note . print w/replies, xml ) Need Help??


in reply to Testing and database date functions

What we do at work is use a custom function instead of current_date(). The custom function, which is implemented in PL/SQL for Oracle and PL/pgSQL for Postgres, looks in a temporary table for a test date or uses the real current date. This allows us to set the "current date" that our SQL code sees.