On Thu, Oct 6, 2011 at 7:56 PM, <[email protected]> wrote: > > Well made it a little further: > > INSERT INTO users (entity_id, username) > SELECT entity_id, login FROM lsmb12.employee em; > > psql:sql/upgrade/1.2-1.3-manual.sql:385: ERROR: null value in column > "username" violates not-null constraint > > I figured out a fix for this one and tried again making it to
Fixing this. > > > > INSERT INTO invoice (id, trans_id, parts_id, description, qty, allocated, > sellprice, fxsellprice, discount, assemblyitem, unit, project_id, > deliverydate, serialnumber, notes) > SELECT id, trans_id, parts_id, description, qty, allocated, > sellprice, fxsellprice, discount, assemblyitem, unit, project_id, > deliverydate, serialnumber, notes > FROM lsmb12.invoice; > > > psql:sql/upgrade/1.2-1.3-manual.sql:474: ERROR: insert or update on table > "invoice" violates foreign key constraint "invoice_trans_id_fkey" > DETAIL: Key (trans_id)=(16796) is not present in table "transactions". > > Which I can't quite figure out since it seems transactions is empty. Checking this out. I think this is done in a transaction so it would roll back. But check to see if there is an RI issue here: SELECT trans_id FROM invoice WHERE trans_id NOT IN (select id in ar union select id from ap); Best Wishes, Chris Travers ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
