Ispirer Website
Ispirer Capabilities - Oracle Migration
Free Trial
Oracle CREATE FUNCTION to HiRDB
Change Oracle Create Statement according to the HiRDB syntax.
Oracle:
CREATE [OR REPLACE] FUNCTION [schema_name.]function_name [(argument_name [IN | OUT | IN OUT] [NOCOPY] datatype [{,argument_name [IN | OUT | IN OUT] [NOCOPY] datatype }...] )] RETURN datatype [{AUTHID {CURRENT_USER | DEFINER} | DETERMINISTIC | PARALLEL_ENABLE}] {IS | AS} function_body;
HiRDB:
CREATE PROCEDURE [schema_name.]function_name (OUT RETURNVAL datatype [,[IN | OUT | INOUT] argument_name datatype [{,[IN | OUT | INOUT] argument_name datatype }...] ] ) function_body;
EXAMPLE:
Oracle:
CREATE OR REPLACE FUNCTION sh.fn1 (par1 NOCOPY FLOAT, par2 IN OUT FLOAT) RETURN TIMESTAMP DETERMINISTIC IS l_data TIMESTAMP; BEGIN RETURN l_data; END;
HiRDB:
CREATE PROCEDURE sh.fn1 (OUT RETURNVAL TIMESTAMP, IN PAR1 FLOAT, INOUT PAR2 FLOAT) BEGIN DECLARE l_data TIMESTAMP; SET RETURNVAL = l_data; END; END_PROC