====== pears.LeastDate ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create function "pears"."LeastDate"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "Date1" date,in "Date2" date ) returns date begin set "Date1" = "isnull"("Date1","Date2"); set "Date2" = "isnull"("Date2","Date1"); if "Date1" < "Date2" then return("Date1") else return("Date2") end if end