User Tools

Site Tools


fx_gain_fx_loss

This is an old revision of the document!


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.1493964064.txt.gz · Last modified: 2024/09/25 06:19 (external edit)