IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_accounts]') AND type = 'V')
DROP VIEW [dbo].[mps_accounts]
GO

CREATE VIEW [dbo].[mps_accounts]
AS
SELECT     acc_cmpid,
acc_type,
acc_category,
acc_date,
acc_objid,
acc_fiid,
acc_origin,
acc_value,
acc_used,
acc_changed,
acc_suspended , acc_ready 
FROM         dbo.mps_account  
union   all 
SELECT     acc_cmpid,
acc_type,
acc_category,
acc_date,
acc_objid,
acc_fiid,
acc_origin,
acc_value,
acc_used,
acc_changed,
acc_suspended , acc_ready 
FROM         dbo.mps_account_history