Table of Contents
Ispirer Website
Ispirer Capabilities - Oracle Migration
Free Trial
Oracle Trunc(date) function to HiRDB
Trunc(date) with YEAR, SYYYY, YYYY, SYEAR, YYY, YY, Y formats
HiRDB has equivalent for Trunc(date) with YEAR, SYYYY, YYYY, SYEAR, YYY, YY, Y formats. SQLWays changes it to truncyear function.
Oracle:
SELECT TRUNC(c1, 'YEAR'), TRUNC(c1, 'SYYYY'), TRUNC(c1, 'YYYY'), TRUNC(c1, 'SYEAR'), TRUNC(c1, 'YYY'), TRUNC(c1, 'YY'), TRUNC(c1, 'Y') FROM t;
HiRDB:
SELECT truncyear(c1), truncyear(c1), truncyear(c1), truncyear(c1), truncyear(c1), truncyear(c1), truncyear(c1) FROM t;
Trunc(date) with others formats
HiRDB hasn't equivalent for Trunc(date) with others formats. SQLWays leaves it as is and adds message /*Сould not convert ' TRUNC ' */.
Oracle:
SELECT TRUNC(c2, 'DAY') FROM t;
HiRDB:
SELECT TRUNC(c2, 'DAY') FROM t; /*Сould not convert ' TRUNC '*/
Trunc with unknown parameter’s data type
HiRDB has equivalent for Trunc with unknown parameter’s data type. SQLWays leaves it as is and adds message /* SQLWays: This conversion has inappropriate possibility */.
Oracle:
create table test_func_types1
( c1 float, c2 float ); select TRUNC(c3,'Y') into n FROM test_func_types1;
HiRDB:
create table test_func_types1
( c1 float, c2 float ); select TRUNC(c3,'Y') into n FROM test_func_types1; /* SQLWays: This conversion has inappropriate possibility */