select (select NOMCLI from CARROS where cast(IDCLI as int) = idreg1) as NOMCLI, fecha
from replog
where movimiento = 'ALT' and TABLA = 'CARROS' and usuario = 'sa'
I have an example here where idcli
is integer: 327 and idreg1 is decimal: 327.00.
I make that query but the nomcli
brings them all null, how would you apply the cast
to do the filter? or if there is another way.