This discussion is archived
2 Replies Latest reply: Apr 23, 2013 10:16 AM by Chandrakaanth Ramamurthy RSS

Issue with db links

991805 Newbie
Currently Being Moderated
Hi,

I have a dblink pointing from oracle to sql server the dblink is working fine for select statement but it is failing for insert can you please help me

Below is the statement

INSERT INTO PS (FO ,C ,START_DT ,END_DT ,END_EST_DATE ,END_DT_NT ,UPDATED_DTTM ,CREATED_DTTM ,OA_OTC_TIME_ENTRY ,OA_OTC_TIME_APPROV) SELECT A.ASS ,A.CA ,
A.STARTDATE ,A.ENDDATE ,A.END_EST_DATE ,A.ENDDATE_NT ,A.UPDATEDATE ,A.CREATEDATE ,A.ELECTRONICTIMEENTRY ,A.ELECTRONICTIMEAPPROVAL FROM PS@PRD A

ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Oracle][ODBC SQL Server Driver][SQL Server] insert of view or function 'PS' failed because it contains a derived or constant field.

I have verified the dblink and it is working fine without any issues for the select statement but its failing for the insert statement

select count(*) from ps@PRD;

row count 20,0000

Below is the insert statement error

ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Driver][SQL Server]Update or insert of view or
function 'PS' failed because it contains a derived or constant
field. {42000,NativeErr = 4406}[Oracle][ODBC SQL Server Driver][SQL
Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
ORA-02063: preceding 2 lines from PRD


Can some one help me with this issue. Please let me know if you need any more information

Edited by: 988802 on Apr 4, 2013 1:36 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points