drop view VW_TCBS_TB_ACCT_BALANCE;
--==============================================================
-- View:VW_TCBS_TB_ACCT_BALANCE
--==============================================================
create view VW_TCBS_TB_ACCT_BALANCE as (
select * from tcbs_tb_acct_balance where year(d_Acct) in (2000,2010)
union all
select * from tcbs_tb_acct_balance1 where year(d_Acct) in (2001,2011)
union all
select * from tcbs_tb_acct_balance2 where year(d_Acct) in (2002,2012)
union all
select * from tcbs_tb_acct_balance3 where year(d_Acct) in (2003,2013)
union all
select * from tcbs_tb_acct_balance4 where year(d_Acct) in (2004,2014)
union all
select * from tcbs_tb_acct_balance5 where year(d_Acct) in (2005,2015)
union all
select * from tcbs_tb_acct_balance6 where year(d_Acct) in (2006,2016)
union all
select * from tcbs_tb_acct_balance7 where year(d_Acct) in (2007,2017)
union all
select * from tcbs_tb_acct_balance8 where year(d_Acct) in (2008,2018)
union all
select * from tcbs_tb_acct_balance9 where year(d_Acct) in (2009,2019)
);
--==============================================================
-- View:VW_TCBS_TB_ACCT_BALANCE
--==============================================================
create view VW_TCBS_TB_ACCT_BALANCE as (
select * from tcbs_tb_acct_balance where year(d_Acct) in (2000,2010)
union all
select * from tcbs_tb_acct_balance1 where year(d_Acct) in (2001,2011)
union all
select * from tcbs_tb_acct_balance2 where year(d_Acct) in (2002,2012)
union all
select * from tcbs_tb_acct_balance3 where year(d_Acct) in (2003,2013)
union all
select * from tcbs_tb_acct_balance4 where year(d_Acct) in (2004,2014)
union all
select * from tcbs_tb_acct_balance5 where year(d_Acct) in (2005,2015)
union all
select * from tcbs_tb_acct_balance6 where year(d_Acct) in (2006,2016)
union all
select * from tcbs_tb_acct_balance7 where year(d_Acct) in (2007,2017)
union all
select * from tcbs_tb_acct_balance8 where year(d_Acct) in (2008,2018)
union all
select * from tcbs_tb_acct_balance9 where year(d_Acct) in (2009,2019)
);