User Tools

Site Tools


deletearapinvoices

If invoice numbers are in sequence then following queries will do the job:

DELETE FROM acc_trans WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');

DELETE FROM invoice WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');

DELETE FROM inventory WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');

DELETE FROM dpt_trans WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');

DELETE FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999';

deletearapinvoices.txt · Last modified: 2024/09/25 06:21 by 127.0.0.1