0
I searched here and found nothing like it.
When I make the following Select :
SELECT
a.idEmpregadoReserva as Controle
,(select EmpresaAplicativo from tbEmpresaAplicativo where tbEmpresaAplicativo.idEmpresaAplicativo = c.idEmpresaAplicativo) Colonia
,d.Nome
,d.Matricula
,a.NumeroDocumento as [Numero Voucher]
,e.ValorVoucher
,f.TipoVoucher
,c.idReserva
,(select tipoformapagto from tbHPG_TipoFormaPagto where tbHPG_TipoFormaPagto.idTipoFormaPagto = a.idTipoFormaPagto) [Forma Pagamento]
FROM [APCEF].[dbo].[tbHPG_EmpregadoReserva_Financeiro] a join tbHPG_EmpregadoReserva_Reserva b on a.idEmpregadoReserva = b.idEmpregadoReserva
join tbHPG_Reserva c on b.idReserva = c.idReserva join tbEmpregado d on c.idEmpregado = d.idEmpregado join tbEmpregadoVoucher e
on a.NumeroDocumento = e.idEmpregadoVoucher
join tbTipoVoucher f on e.idTipoVoucher = f.idTipoVoucher
where c.DataEntrada between '2019-01-23' and '2019-01-27' and (c.idEmpresaAplicativo = 4 or c.idEmpresaAplicativo = 5)
and a.idTipoFormaPagto = 1
And the next thing :
However I would like to make a select as if it were a select DISTINCT but ignoring IDRESERVA, ie pulling only 1 voucher number ( it can not repeat )
puts the select code for us please, can give crtl+c
– Germano Buss Niehues
@Germanobussniehues I made the substitution
– Axcse