Views:

We recently had a client that received a duplicate key error when creating a new year. We found the cause was having both the UK and US audit trails in the SY01000 table. They were using a UK and US GP install to access the same company. This is not supported. 

To find the duplicates the following script was run. We then removed the audit trail code for the install that should not be used with the company. UK installs us a TRN ending while a US uses a TRX.

select * from SY01000 A 
join SY01000 B on A.TRXSOURC=B.TRXSOURC and A.SEQNUMBR=B.SEQNUMBR
and A.DEX_ROW_ID<>B.DEX_ROW_ID AND A.SEQNUMBR>0