IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[V_EST_PARAM_COMPRAS_GRUPO_TP_NIVEL_DS]'))
DROP VIEW [dbo].[V_EST_PARAM_COMPRAS_GRUPO_TP_NIVEL_DS]
GO
GO

CREATE VIEW V_EST_PARAM_COMPRAS_GRUPO_TP_NIVEL_DS
AS
SELECT 1 AS TP_NIVEL, 'PRODUTO' AS DS_TP_NIVEL 
UNION
SELECT 2, 'FAMILIA' UNION
SELECT 3, 'MARCA' UNION
SELECT 4, 'FABRICANTE' UNION
SELECT 5, 'CATEGORIA' UNION
SELECT 6, 'LINHA'	