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

CREATE VIEW [dbo].[mps_accounts_operation]
AS
SELECT    accop_id,
accop_cmpid,
accop_type,
accop_category,
accop_date,
accop_objid,
accop_fiid,
accop_opdate,
accop_operation,
accop_value,
accop_bizid,
accop_no,
accop_ordid,
accop_jbid 
FROM         dbo.mps_account_operation  
union   all 
SELECT     accop_id,
accop_cmpid,
accop_type,
accop_category,
accop_date,
accop_objid,
accop_fiid,
accop_opdate,
accop_operation,
accop_value,
accop_bizid,
accop_no,
accop_ordid,
accop_jbid 
FROM         dbo.mps_account_operation_history