Table of Contents
User Documentation
Ispirer Capabilities - Oracle Migration
Pricing
Oracle To_char(date) function to HiRDB
To_char(date) function without nls_parameters
HiRDB has equivalent for To_char(date) function without nls_parameters. SQLWays changes it to VARCHAR_FORMAT function.
Oracle:
SELECT TO_CHAR(current_date), TO_CHAR(current_date, 'IY-MM-DD HH24:MI:SS'), TO_CHAR(current_date, 'RRRR-MM-DD HH24:MI:SS') , TO_CHAR(current_date, 'IYYY-MM-DD HH24:MI:SS') from to_char_tab;
HiRDB:
SELECT VARCHAR_FORMAT(CURRENT_DATE, 'YYYY-MM-DD HH:MI:SS'), VARCHAR_FORMAT(CURRENT_DATE,'YY-MM-DD HH:MI:SS'), VARCHAR_FORMAT(CURRENT_DATE,'YYYY-MM-DD HH:MI:SS'), VARCHAR_FORMAT(CURRENT_DATE,'YYYY-MM-DD HH:MI:SS') from to_char_tab;
To_char(date) with nls_parameters
HiRDB hasn't equivalent for To_char(date) with nls_parameters. SQLWays leaves it as is and adds message /*Сould not convert ' TO_CHAR' */.
Oracle:
SELECT TO_CHAR(current_date, 'IY-MM-DD HH24:MI:SS', 'NLS_DATE_LANGUAGE = American') FROM t;
HiRDB:
SELECT TO_CHAR(current_date, 'IY-MM-DD HH24:MI:SS', 'NLS_DATE_LANGUAGE = American') FROM t; /* Сould not convert ' TO_CHAR' */
To_char(date) with unknown parameter’s data type
HiRDB has equivalent for To_char(date) with unknown parameter’s data type. SQLWays changes it to CAST function and adds message /* SQLWays: This conversion has inappropriate possibility */.
Oracle:
create table test_func_types1 ( c1 float, c2 float ); SELECT TO_CHAR(c3, 'IY-MM-DD HH24:MI:SS') FROM test_func_types1;
HiRDB:
create table test_func_types1 ( c1 float, c2 float ); SELECT CAST(c3 AS MVARCHAR(255)) FROM test_func_types1; /* SQLWays: This conversion has inappropriate possibility */