データベース サーバーを PostgreSQL から Oracle 11g に移行しています。Squirrel SQLなどのさまざまなツールを試しました。ただし、ほとんどの移行ツールは、テーブルとビューの移行をサポートしています。手順と機能を移行するための解決策が見つかりません。機能と手順を移行する方法を教えてください。以下の機能のいずれかを見つけてください。
CREATE OR REPLACE FUNCTION hrms.fngetstatus(iactdate character varying, ideactdate character varying)
RETURNS character varying AS
$BODY$
returnval VARCHAR (1);
BEGIN
IF TO_DATE (iactdate, 'mm/dd/yyyy') >
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') >
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'D';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') >
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') IS NULL
THEN
returnval := 'D';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') <=
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') >
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'A';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') <=
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') IS NULL
THEN
returnval := 'A';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') <
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') <=
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'D';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') =
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') =
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'D';
ELSIF TO_DATE (ideactdate, 'mm/dd/yyyy') >=
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (iactdate, 'mm/dd/yyyy') is null
THEN
returnval := 'A';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') <=
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') <
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'A';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') >
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') <
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'D';
ELSIF TO_DATE (iactdate, 'mm/dd/yyyy') >
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
AND TO_DATE (ideactdate, 'mm/dd/yyyy') <=
TO_DATE (TO_CHAR (SYSDATE, 'mm/dd/yyyy'), 'mm/dd/yyyy')
THEN
returnval := 'D';
END IF;
RETURN returnval;
END$BODY$
LANGUAGE edbspl VOLATILE SECURITY DEFINER
COST 100;
ALTER FUNCTION hrms.fngetstatus(character varying, character varying)
OWNER TO enterprisedb;