Bom dia, não entendi pq d usar o RDB$DATABASE. Eu faria assim: select * from TB_CRE CRE where CRE.CRE_DTVEND000 between dateadd (-30 hour to current_time) and current_time ABÇS