select A.NUM_DOC as [Id],B.NumEmpleado as NumEmpleado,A.RFCReceptorSAT as RFCReceptor,A.RazonSocialReceptorSAT as RazonSocialReceptor,B.Departamento as Departamento,A.SerieSAT as Serie,A.FolioSAT as Folio, 
A.UUIDSAT as UUID,A.TotalSAT as Total,A.FechaFacturacionSAT as FechaFacturacion,A.FechaTimbradoSAT as FechaTimbrado,A.IdPDFSAT as IdPDF,A.TipoNominaSAT as TipoNomina,A.PeriodicidadPagoSAT as PeriodicidadPago,A.FechaPagoSAT as FechaPago, 
CAST(isnull(A.CanceladoSAT,0) AS BIT) as [Cancelado] 
from gMaestraSAT as [A] left outer join eEmployee as [B] on B.NUM_DOC>0 and A.RFCReceptorSAT = B.RFC 
where A.NUM_DOC>0 and isnull(A.CanceladoSAT,0)=0 and A.AnioSAT = 2016 and A.MesSAT = 'Junio' and A.OrigenSAT = 'Recibos de Nómina'