I want to create an insert statement in a PL/SQL Script that inserts the larger of two different values. Conceptually, what I want to do is something like
Insert into MYTABLE (DATE_INSERT)
VALUE (MAX(DATE_DEFAULT, DATE_INSERT_VALUE))
where DATE_DEFAULT
and DATE_INSERT_VALUE
are local variables of type DATE
. The MAX
function, however, is an aggregate function so I can't pass two arguments to it.