IEA Software, Inc.

IEA Software Knowledge Base - ID:56058

IEA Knowledge base

Emerald (KB ID: 56058)

Jan 5 2006

When converting an Emerald 2.5 database to Emerald 4.5 the following query error appears the conversion process.

[Microsoft][ODBC SQL Server Driver][SQL Server]INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK__InvoiceIt__Invoi__689D8392'. The conflict occurred in database 'Emerald', table 'Invoices', column 'InvoiceID'

How can this error be corrected?

Jan 5 2006

This error indiciates there are Invoice Detail records defined in the Emerald 2.5 database associated with Invoices that have since been removed.
To remove these 'orphaned' detail records from the Emerald 2.5 database run the following query against the Emerald 2.5 database:

DELETE FROM
InvoiceItems WHERE InvoiceID NOT IN (SELECT InvoiceID FROM Invoices)

After the query has been executed, re-run the conversion process.