Hi Nikolay Trifonov ! Может так ?
select coalesce((Select first 1 cr.Rate from Currency_Rate cr
where cr.Date_change <= '26.04.2005'
and cr.ID_Currency = 2
order by cr.Date_change desc),0) from RDB$DATABASE
---------
Hi Nikolay Trifonov ! Может так ?
select coalesce((Select first 1 cr.Rate from Currency_Rate cr
where cr.Date_change <= '26.04.2005'
and cr.ID_Currency = 2
order by cr.Date_change desc),0) from RDB$DATABASE
---------