56,677
社区成员
发帖
与我相关
我的任务
分享
insert into sysresult
(
`Bank_Name`,
`Bank_code`,
`Account`,
`Account_Name`,
`Account_Property`,
`BankInnerDate`,
`BankRevocationDate`,
`type`,
`ResultType`,
areaId,
resultBankId,
bankId,
optor
)
select
Bank_Name,
Bank_code,
Account,
Account_Name,
Account_Property,
Bank_inner_date ,
RevocationDate,
type,
1 as state,
#areaId as areaId ,
#resultBankId as resultbank,
#bankId as bankId,
#optor as optor
from
#table T
WHERE
type=1
AND T.`Account` not in (SELECT Account FROM #table WHERE type=3)
AND T.`Account_Property` in ('基本存款账户','临时机构临时存款账户','非临时机构临时存款账户','预算单位专用存款账户','临时存款账户')