IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[privateview_37]') AND type = 'V')
DROP VIEW [dbo].[privateview_37]
GO
CREATE VIEW [dbo].[privateview_37]
AS
select max(prd_id) objid, 
prd_gl [归类],
prd_xh1 [细化1]
from mps_prd2 where prd_pcid = 18 and charindex('临',prd_code) = 0 
group by prd_gl,prd_xh1