User Tools

Site Tools


fx_gain_fx_loss

Differences

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

Link to this comparison view

fx_gain_fx_loss [2017/05/05 06:01] (current)
sweitmann created
Line 1: Line 1:
 +DROP TABLE tmp;
 +DROP TABLE tmp2;
  
 +CREATE TABLE tmp AS SELECT DISTINCT trans_id FROM acc_trans WHERE chart_id IN (SELECT fldvalue::​integer FROM defaults WHERE fldname='​fxgain_accno_id'​);​
 +
 +CREATE TABLE tmp2 AS SELECT trans_id FROM tmp WHERE trans_id IN (SELECT DISTINCT trans_id FROM acc_trans WHERE chart_id IN (SELECT fldvalue::​integer FROM defaults WHERE fldname='​fxloss_accno_id'​));​
 +
 +SELECT invnumber FROM ar WHERE id IN (SELECT trans_id FROM tmp2);
 +SELECT invnumber FROM ap WHERE id IN (SELECT trans_id FROM tmp2);
fx_gain_fx_loss.txt ยท Last modified: 2017/05/05 06:01 by sweitmann