Robert Fraser wrote:
HiOn 6/16/07, *Robert Fraser* <..hidden.. <mailto:..hidden..>> wrote:
and INSERT INTO transactions (id, table_name) SELECT id, 'vendor' FROM vendor; There seem to be about 10 duplicate ids from customer and 5 from vendor Cheers RobI assume that for some reason SQL-Ledger has lost integrity for these rows with duplicate ids (this instance of SQL-Ledger has been in use for quite a while). Do I need to choose one of the tables and change the offending ids to something unique? I guess depending on which one I choose to change, the id may be a foreign key in another relation?
I doubt (although I would have to check) that it is a foreign key. SQL Ledger lacks pretty much any idea of referential integrity. Your steps would probably work.
Joshua D. Drake
Thanks Rob ------------------------------------------------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ------------------------------------------------------------------------ _______________________________________________ Ledger-smb-users mailing list ..hidden.. https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
-- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL Replication: http://www.commandprompt.com/products/