Oracle DG4ODBC does not support functions within INSERT
statements. If you attempt to do this, you will get an ORA-02070
error. For example:
INSERT INTO vc@odbc ("c1") VALUES (current_timestamp); ORA-02070: database ODBC does not support operator 293 in this context
INSERT INTO vc@odbc ("c1") VALUES (sysdate); ORA-02070: database ODBC does not support special functions in this context
We worked around this issue in the following way:
create table vc ( c0 int IDENTITY(1,1) NOT NULL, c1 datetime, primary key (c0))
INSERT
statements shown above, but got the ORA-02070
error. To work around this, we passed the contents of the function into a data store and then passed the data store to the INSERT
statement. For example:
DECLARE d1 date; BEGIN select sysdate into d1 from dual; INSERT INTO vc@odbc ("c1") values (d1); END;/ PL/SQL procedure successfully completed. SQL> select * from vc@odbc; c0 c1 ---------- --------- 1 03-MAR-14