[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need advice...



Ok, the first thing to do is to try to get rid of these erroneous
records.  This means correcting the data at the database level.

netamount should be 0 in this case.  It looks like you may need to
update the acc_trans table to set that to 0 instead of NaN.  I.e. back
up the data, (you may also want to select into a new table also) and:
UPDATE acc_trans SET amount = 0 WHERE amount = 'NaN';

Once this is done, set up constraint in the database:
ALTER TABLE acc_trans ADD CHECK (amount <> 'NaN');

This way  a bad invoice will cause an error instead of posting odd
data.  This also means more immediate support calls and a better
chance of tracking this down.

Best Wishes,
Chris Travers

Sent you 1 of the 4 bad records I found privately.

Charley

-------------------------------------------------------------------------
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