IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[privateview_14]') AND type = 'V')
DROP VIEW [dbo].[privateview_14]
GO
CREATE VIEW [dbo].[privateview_14]
AS
select RANK() over(partition by ord_sf,ord_cs order by ord_sf ) as ranking, 
ord_sf,ord_cs,ord_dpmc,ord_dpbh,ord_dpzt,ord_dplx,ord_id objid ,
ord_szpqcode ,ord_pqzjcode ,ord_pqjlcode,ord_pqddcode  
from order_188 
where ord_dpzt!='停止营业'