Subject | RE: [firebird-support] SQL conundrum |
---|---|
Author | Clay Shannon |
Post date | 2005-04-08T18:48:43Z |
> A time literal has to be of the format 'hh:nn:ss.xxxx'.This does exactly what I want (got the idea from your book, p. 158):
select e.fullname, d.deptname, p.dayofweek, p.pchin,
p.pchinloc, p.pchout, p.pchoutloc
from pchup p
join empinfo e on e.empno = p.empno
join dept d on d.deptno = p.pchdept
where (id > 305)
and cast (p.PCHIN as date) between '2005/4/5' and '2005/4/7'
and cast (extract (HOUR from p.pchin) as char(2))|| ':' ||
cast (extract (MINUTE from p.pchin) as char(2))|| ':' ||
cast (extract (SECOND from p.pchin) as char(7))
between '13:00:00.0000' and '23:59:59.9999'
Clay Shannon,
Dimension 4 Software