Skip to content

A Scheduled Database Task parameter that should compute a value a set number of years in the future (like #NUMBER_OF_THIS_YEAR#+5 for a NUMBER-type parameter) doesn't actually perform the addition — it passes the literal, unevaluated expression through as-is, even though the same kind of calculation (like sysdate+22) works fine on a DATE-type parameter elsewhere.

Answer

This kind of in-parameter calculation only works for parameters of datatype DATE, and only when the expression is built around the literal keyword sysdate — a NUMBER-type parameter like a plain year value doesn't support any calculation syntax at all; whatever you type into it is passed through completely literally. There's no way to make arithmetic work on a NUMBER parameter this way — the practical workaround is to schedule a separate one-off run each year with that year's already-computed literal value hardcoded into the schedule (for example, a schedule run in 2023 with the value 2028, then a new schedule the following year with 2029), rather than trying to get the database task to compute it dynamically.

← Browse Developer Studio, deployment, and upgrades questions