/*虚拟账户升级*/

INSERT INTO T_BD_ACCOUNTBANKS_A(FID,FISVIRTUAL)
SELECT FID,'0' 
FROM T_BD_ACCOUNTBANKS A WHERE A.FID NOT IN (
	SELECT FID FROM T_BD_ACCOUNTBANKS_A
);
UPDATE T_BD_ACCOUNTBANKS_A SET FISVIRTUAL = '1' WHERE FID IN(
	SELECT O.FID FROM T_BD_ACCOUNTBANKS O
	INNER JOIN T_BD_FINORGINFO A ON O.FBANKID = A.FID  
	INNER JOIN  T_BD_BANKCGSETTING B ON A.FBANKCATEID = B.FID
	WHERE B.FNUMBER = 'BC-9999'
);