Hi Glen,
I don't think the attribute view might be causing the issue. It is just a view and should not perform unique constraint check. This seems more with the data.
Can I request you to do something to check if there are any duplicate records in the table itself.
- Please create a table as follows:
- CREATE COLUMN TABLE T_CHECK ( "MANDT" NVARCHAR(3), "MATNR" NVARCHAR(18), "CHARG" NVARCHAR(10), "ADBTH" DATE );
- Insert the data to the table T_CHECK
- Run the following SQL to identify if there are any duplicate values:
- select "MATNR", "CHARG", count(*) from T_CHECK group by "MATNR", "CHARG" having count(*) > 1;
My doubt is there might be multiple values for MANDT for a given combination of MATNR and CHARG, which is causing the unique key constraint issue. Ideally even MANDT should be part of the primary key.
Regards,
Ravi