IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[privateview_21]') AND type = 'V')
DROP VIEW [dbo].[privateview_21]
GO
CREATE VIEW [dbo].[privateview_21]
AS
select ord_id as objid , 
       ord_fwblx as [服务类型],
       ord_fwbmc as [服务包名称],
       ord_lxdh as [联系电话],
       ord_sfzh as [身份证号],
       ord_sjch as [手机串号],
       ord_sjpp as [手机品牌],
       ord_sjxh as [手机型号]
from order_263 
where ord_fwsyzt != '已使用' 
and isnull(ord_fwsyid,0) = 0 
and datediff(day,getdate(),ord_fwksrq2) <=0
and charindex('废',ord_no)=0 
and datediff(day,getdate(),ord_fwjzrq2) >= 0 
and ord_hpfwcs > 0
and ord_lxdh<>'11111111111'
and isnull(ord_sfzh,'') <>''