IF OBJECT_ID('V_PAINEL_NFE_EST_NF_SAI_TRANSFERENCIA_PENDENTE_QTDE') IS NOT NULL
	 DROP VIEW	V_PAINEL_NFE_EST_NF_SAI_TRANSFERENCIA_PENDENTE_QTDE
GO
--SELECT * FROM V_PAINEL_NFE_EST_NF_SAI_TRANSFERENCIA_PENDENTE_QTDE	WITH (NOLOCK)CREATE VIEW V_PAINEL_NFE_EST_NF_SAI_TRANSFERENCIA_PENDENTE_QTDE  AS
SELECT 
	COUNT(EST_NF_SAI_PENDENCIA.CD_NF) QTDE_TRANSFERENCIA
FROM 
	EST_NF_SAI_PENDENCIA LEFT OUTER JOIN EST_NF_SAI_CHECKIN_ENTRADA ON
	EST_NF_SAI_PENDENCIA.CD_EMP = EST_NF_SAI_CHECKIN_ENTRADA.CD_EMP AND
	EST_NF_SAI_PENDENCIA.CD_FILIAL = EST_NF_SAI_CHECKIN_ENTRADA.CD_FILIAL AND
	EST_NF_SAI_PENDENCIA.CD_NF = EST_NF_SAI_CHECKIN_ENTRADA.CD_NF
WHERE
	EST_NF_SAI_CHECKIN_ENTRADA.CD_NF IS NULL