/****** Object:  View [dbo].[V_PDV_VD_ORIGEM_VENDA]    Script Date: 09/04/2012 14:20:46 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[V_PDV_VD_ORIGEM_VENDA]'))
DROP VIEW [dbo].[V_PDV_VD_ORIGEM_VENDA]
GO
--SELECT * FROM V_PDV_VD_ORIGEM_VENDA
CREATE VIEW V_PDV_VD_ORIGEM_VENDA AS
SELECT
0 AS CD_ORIGEM_VENDA,
'Venda Direto no pdv' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
1 AS CD_ORIGEM_VENDA,
'Pre-Vendas\Orcamento de vendas' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
2 AS CD_ORIGEM_VENDA,
'Televendas' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
3 AS CD_ORIGEM_VENDA,
'Vendas PBM' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
4 AS CD_ORIGEM_VENDA,
'Drive Thru' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
5 AS CD_ORIGEM_VENDA,
'Cupom Nao fiscal' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
6 AS CD_ORIGEM_VENDA,
'Devolucao de vendas' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
7 AS CD_ORIGEM_VENDA,
'Nota Fiscal' AS DS_CD_ORIGEM_VENDA
UNION ALL
SELECT
8 AS CD_ORIGEM_VENDA,
'Devolucao de Nota Fiscal' AS DS_CD_ORIGEM_VENDA
