Hi All,
while trying to load data Through SDA from SAP hana to Oracle tables, we are facing an issue w.r.t date columns.
For example:
Table definition in oracle :
create table test ( a number,b date);
created an virtual table vt_test in sap hana.
CREATE VIRTUAL TABLE vt_test AT ORACLE."NULL".schema_name.TEST;
table defintion SAP hana :
create table test ( a integer, b date);
while executing below query getting below error
INSERT INTO VT_TEST(A,B) (SELECT a,b FROM test);
Could not execute 'INSERT INTO VT_TEST(A,B) (SELECT a,b FROM test)' in 259 ms 615 µs .
SAP DBTech JDBC: [403]: internal error: Error executing query [Oracle][ODBC]Invalid datetime format. for query " INSERT INTO "schema_name"."TEST" ( "A", "B") VALUES (?, ?)";
we tried out various options like below:
INSERT INTO VT_TEST(A,B) (SELECT a,to_date(b,'yyyymmdd') FROM test);
INSERT INTO VT_TEST(A,B) (SELECT 1,'1996-01-02 00:00:00.0' FROM test);
INSERT INTO VT_TEST(A,B) (SELECT 1,cast (to_char('1996-01-02','YYYY-MM-DD') as date) FROM test);
Please let me know what could reason for the issue