so i need this to write in oracles sql using sysdate
sum(datediff(day,Clan.Dat_od,(CASE when clan.dat_do is null then getdate() else clan.dat_do end ))) as brojdana
Advertisement
Answer
In Oracle, this would look like:
select sum(coalesce(clan.dat_do, trunc(sysdate)) - trunc(clan.dat_od)) as brojdana