Hi,
My problem/question is this:
I want to select the rows that has a date that's within office-hours i e I both want to say that I want the rows that has a date between two dates but also that it should be between 08 and 17 every day.
I came up with this (see select statement below), and it works, but I want to make sure that there's no other (better) way to do it as it seems there could be...
table1
------
id
prod_date (date datatype)
select id
from table1
where to_char(prod_date,'yyyy-mm-dd') between '2002-01-01' and '2002-01-31'
and to_char(date,'hh24:mi:ss') between '08:00:00' and '17:00:00'
/PeJo
My problem/question is this:
I want to select the rows that has a date that's within office-hours i e I both want to say that I want the rows that has a date between two dates but also that it should be between 08 and 17 every day.
I came up with this (see select statement below), and it works, but I want to make sure that there's no other (better) way to do it as it seems there could be...
table1
------
id
prod_date (date datatype)
select id
from table1
where to_char(prod_date,'yyyy-mm-dd') between '2002-01-01' and '2002-01-31'
and to_char(date,'hh24:mi:ss') between '08:00:00' and '17:00:00'
/PeJo