parse error. detail message is :
ERROR: 'update'
source sql is :
update #TM_CB_EXPCOLLIMPBILLDATA as t0 set (FEXPENSEITEMID) =( select sluentry.FEXPENSEITEMID from T_CB_EXPENSEIMPSLUENTRY sluentry where sluentry.FENTRYID = t0.FSLUENTRYID AND t0.FEXPENSEITEMID=0)
update #TM_CB_EXPCOLLIMPBILLDATA as t0 set (FDEFAULTCCID) =( select tmp.FCOSTCENTERID FROM (SELECT impslucc.FENTRYID,ccenter.FRELATION, MIN(ccenter.FCOSTCENTERID) AS FCOSTCENTERID FROM T_CB_EXPENSEIMPSLUCC impslucc INNER JOIN T_CB_COSTCENTER ccenter on impslucc.FCOSTCENTERID=ccenter.FCOSTCENTERID WHERE ccenter.FDOCUMENTSTATUS='C' AND ccenter.FFORBIDSTATUS='A' GROUP BY impslucc.FENTRYID,ccenter.FRELATION) as tmp where tmp.FENTRYID=t0.FSLUENTRYID AND tmp.FRELATION=t0.FDEPARTID)
update #TM_CB_EXPCOLLIMPBILLDATA as t0 set (FBIZORGID) =( select cc.FUSEORGID FROM #TM_CB_EXPCOLLIMPBILLDATA t1 INNER JOIN T_CB_COSTCENTER cc ON cc.FCOSTCENTERID=t1.FDEFAULTCCID WHERE t0.FSRCBILLFORMID=t1.FSRCBILLFORMID AND t0.FAMOUNT=t1.FAMOUNT AND t0.FSRCBILLID=t1.FSRCBILLID AND t0.FSRCENTRYID=t1.FSRCENTRYID)
update #TM_CB_EXPCOLLIMPBILLDATA as t0 set (FSRCBILLNAME) =( select isnull(metaL.FNAME,' ') as FNAME from T_META_OBJECTTYPE meta LEFT JOIN T_META_OBJECTTYPE_L metaL ON metaL.FID=meta.FID and metaL.FLOCALEID=2052 where meta.FID = t0.FSRCBILLFORMID)
merge into #TM_CB_EXPCOLLIMPBILLDATA T0 using (select isnull(metaL.FNAME,' ') as FNAME,'-1ER_ExpenseTransfer' as FID from T_META_OBJECTTYPE meta LEFT JOIN T_META_OBJECTTYPE_L metaL ON metaL.FID=meta.FID and metaL.FLOCALEID=2052 where meta.fid='ER_ExpenseTransfer' ) T ON (T.FID = T0.FSRCBILLFORMID) WHEN MATCHED THEN UPDATE SET T0.FSRCBILLNAME=T.FNAME
update #TM_CB_EXPCOLLIMPBILLDATA as t0 set (FTAXRATE) =( select t1.FCALRATE from TMP3F7235A591D711E69D5702E0EC2 t1 where t1.FCALCYFORID = t0.FSRCCURRENCYID and t1.FRateDate = t0.FDATE )
update #TM_CB_EXPCOLLIMPBILLDATA set FAMOUNT=round(FAMOUNT*FTAXRATE, FAMOUNTDIGITS) WHERE FSRCCURRENCYID<>FTARGETCURRENCYID
QQ1627022641