
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE view [dbo].[vw_acc_advances]
as
	select	a.*, adv.*, p.pol_last_policy_situation_id
	from	acc_accounts a
			inner join acc_advances adv on adv.adv_advance_id = a.a_account_id
			left join pol_policies p on p.pol_policy_id = adv.adv_policy_id 

GO
