0
drop function if exists getMonthName;
create function getMonthName (p_date date)
returns varchar(10)
begin
  declare v_month integer;
  set v_month = extract(month from p_date);
  return (
    case
      when v_Month = 1 then 'January'
      when v_Month = 2 then 'February'
      when v_Month = 3 then 'March'
      when v_Month = 4 then 'April'
      when v_Month = 5 then 'May'
      when v_Month = 6 then 'June'
      when v_Month = 7 then 'July'
      when v_Month = 8 then 'August'
      when v_Month = 9 then 'September'
      when v_Month = 10 then 'October'
      when v_Month = 11 then 'November'
      when v_Month = 12 then 'December'
    end
  );
end;
Category: 
SQL Functions & Procedures
Current Version: 
1.00
Supported Products: 
NexusDB V2
NexusDB V3
Home