fx_gain_fx_loss
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: 2024/09/25 06:21 by 127.0.0.1