--交易明细电子回单关联信息分录 历史数据处理--
INSERT INTO T_BEI_MATCHRECEIPTENTRY(FID,FERECEIPTID,FERECEIPTNO,FENTRYID)
SELECT D.FID,R.FID,D.FRECEIPTNO,D.FID FROM T_BEI_TRANSDETAIL AS D JOIN T_BEI_ELECRECEIPT AS R ON D.FRECEIPTNO = R.FRECEIPTNO WHERE D.FRECEIPTNO != ' ' AND D.FRECEIPTNO != '' AND D.FID NOT IN (SELECT FID FROM T_BEI_MATCHRECEIPTENTRY);