SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



CREATE view [dbo].[vw_tt_act_banks_pr]
as

	select	bkpr__act_actor_id = act_actor_id,
			bkpr__act_address_id = act_address_id,
			
			bkpr__adr_name = adr_name,
			bkpr__adr_first_name = adr_first_name,
			bkpr__adr_complete_name = adr_complete_name,
			bkpr__adr_address1 = adr_address1,
			bkpr__adr_address2 = adr_address2,
			bkpr__adr_address3 = adr_address3,
			bkpr__adr_postal_code = adr_postal_code,
			bkpr__adr_city = adr_city,
			bkpr__adr_country_code = adr_country_code,
			bkpr__adr_mail = adr_mail,
			bkpr__adr_home_phone = adr_home_phone,
			bkpr__adr_business_phone = adr_business_phone,
			bkpr__adr_business_phone2 = adr_business_phone2,
			bkpr__adr_mobile_phone = adr_mobile_phone,
			bkpr__adr_fax = adr_fax,
			bkpr__adr_title_code = adr_title_code,
			
			bkpr__nmtit_l1 = nmtit_l1,
			bkpr__nmtit_l2 = nmtit_l2,
			bkpr__nmtit_l3 = nmtit_l3,

			bkpr__nmtit_short_code_l1 = nmtit_short_code_l1,
			bkpr__nmtit_short_code_l2 = nmtit_short_code_l2,
			bkpr__nmtit_short_code_l3 = nmtit_short_code_l3,
			
			bkpr__nmctr_l1 = nmctr_l1,
			bkpr__nmctr_l2 = nmctr_l2,
			bkpr__nmctr_l3 = nmctr_l3
	from act_banks
		inner join act_actors on act_actor_id = bk_actor_id
		inner join adr_addresses on adr_address_id = act_address_id 
		left join nm_titles on nmtit_title_code = adr_title_code
		left join nm_countries on nmctr_country_code = adr_country_code



GO
