2023-04-18 17:40:01 +09:00

9 lines
302 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
-- 年月を日付加工date型
CREATE FUNCTION src05.to_date_yyyymm01(yyyymm varchar(6))
RETURNS date DETERMINISTIC
BEGIN
RETURN (STR_TO_DATE(CONCAT(yyyymm,'01'),'%Y%m%d'));
END
;