Hi
I have a problem appending data into an oracle table from access. I imported the new data from an excel sheet into a table in access and useed an append query to add the data into a linked oracle table. The linked table has a composit primary key (Code, Org). The table in access has new data that are not in the oracle table and the data in the PK fields are not duplicated. I also made sure that both tables have same data types.
I created an append query that adds the records from the imported table into the linked one. The append query is done successfully on a copy of the linked table, however I keep getting the Key Violation error when I try it on the linked table. It says that access didn't add 932 (All records) record(s) to the table due to key violations. The table has lots of fields but I want to add only the fields in the query below.
Here is my query:
I have a problem appending data into an oracle table from access. I imported the new data from an excel sheet into a table in access and useed an append query to add the data into a linked oracle table. The linked table has a composit primary key (Code, Org). The table in access has new data that are not in the oracle table and the data in the PK fields are not duplicated. I also made sure that both tables have same data types.
I created an append query that adds the records from the imported table into the linked one. The append query is done successfully on a copy of the linked table, however I keep getting the Key Violation error when I try it on the linked table. It says that access didn't add 932 (All records) record(s) to the table due to key violations. The table has lots of fields but I want to add only the fields in the query below.
Here is my query:
Code:
INSERT INTO D7ITEST_R5OBJECTS ( OBJ_OBTYPE, OBJ_OBRTYPE, OBJ_CODE, OBJ_DESC, OBJ_RSTATUS, OBJ_RECORD, OBJ_GROUP, OBJ_USER, OBJ_ORG, OBJ_LOCATION, OBJ_MRC, OBJ_COMMISS, OBJ_STATUS, OBJ_DEPEND, OBJ_PRODUCTION, OBJ_NOTUSED, OBJ_SAFETY, OBJ_STATE, OBJ_RSTATE ) SELECT R5OBJECTS.[OBJ OBTYPE], R5OBJECTS.[OBJ OBRTYPE], R5OBJECTS.[OBJ CODE], R5OBJECTS.[OBJ DESC], R5OBJECTS.[OBJ RSTATUS], R5OBJECTS.[OBJ RECORD], R5OBJECTS.[OBJ GROUP], R5OBJECTS.[OBJ USER], R5OBJECTS.[OBJ ORG], R5OBJECTS.[OBJ LOCATION], R5OBJECTS.[OBJ MRC], R5OBJECTS.[OBJ COMMISS], R5OBJECTS.[OBJ STATUS], R5OBJECTS.[OBJ DEPEND], R5OBJECTS.[OBJ PRODUCTION], R5OBJECTS.[OBJ NOTUSED], R5OBJECTS.[OBJ SAFETY], R5OBJECTS.[OBJ STATE], R5OBJECTS.[OBJ RSTATE] FROM R5OBJECTS LEFT JOIN D7ITEST_R5OBJECTS ON (R5OBJECTS.[OBJ CODE] = D7ITEST_R5OBJECTS.OBJ_CODE) AND (R5OBJECTS.[OBJ ORG] = D7ITEST_R5OBJECTS.OBJ_ORG);
Comment