Source Code
create procedure mrcworklib.validdates
(inout i_error char(99),
inout i_strdate decimal(8,0),
inout i_enddate decimal(8,0))
LANGUAGE SQL
CASE
when i_strdate = 0 and i_enddate = 0 then
set i_error = 'You have not entered any dates.';
when i_strdate = 0 then
set i_error = 'You must enter a starting date.';
when i_enddate = 0 then
set i_error = 'You must enter an ending date.';
when i_strdate > i_enddate then
set i_error = 'Start date is later than end date.';
else
set i_error = ' ';
END CASE