Friday, January 22, 2016
ORA-02070 error insert data into SQL Server
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:
We created this SQL Server table:
create table vc ( c0 int IDENTITY(1,1) NOT NULL, c1 datetime, primary key (c0))
Next, we tried to run one of the 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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment