Does anyone know how to retrieve the current date in DB2 so you could use that value in a query as if you hard coded the value? Our DBA says that by using an object called current date whose definition is simply select current date is very inefficient since it has to generate the value each time the row is evaluated in the query. The DBA suggested a singleton select against a 1 row table (to get current date or to do date math with current date) and then pass the result into other queries.
Listserv Archives (BOB member since 2002-06-25)