IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[privateview_18]') AND type = 'V')
DROP VIEW [dbo].[privateview_18]
GO
CREATE VIEW [dbo].[privateview_18]
AS
select distinct
    cu.cu_id as objid,
    cu.cu_name +'|'+cu.cu_account as name,
    cu.cu_account as code
from mps_employee cu,order_188 da
where cu.cu_account = da.ord_szpqcode
union
select -100 as objid,'全部' as name,'' as code