User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

find_ar_without_tax [2018/05/28 12:09] (current)
sweitmann created
Line 1: Line 1:
 +Two statements needed using a temporary table:
 +     CREATE TABLE tmp1 AS SELECT id, (SELECT COUNT(*) FROM acc_trans WHERE chart_id IN (SELECT id FROM chart WHERE link LIKE '%tax%' AND acc_trans.trans_id = cnt FROM ar;
 +     SELECT invnumber, amount, netamount FROM ar WHERE id IN (SELECT id FROM tmp1 WHERE cnt=0) AND transdate BETWEEN '2018-01-01' AND '2018-05-30';
 +Once you are done you can run:
 +     DROP TABLE tmp1;
find_ar_without_tax.txt ยท Last modified: 2018/05/28 12:09 by sweitmann