select * from table
where to_char(to_date(estimate_date,'yyyy-mm-dd')-7,'yyyy-mm-dd')<='2000-01-01'
and to_char(to_date(estimate_date,'yyyy-mm-dd')+7,'yyyy-mm-dd')>='2000-01-01'
where to_char(to_date(estimate_date,'yyyy-mm-dd')-7,'yyyy-mm-dd')<='2000-01-01'
and to_char(to_date(estimate_date,'yyyy-mm-dd')+7,'yyyy-mm-dd')>='2000-01-01'
where
estimate_date between to_date('2004-01-01','yyyy-mm-dd')-14 and to_date('2004-01-01','yyyy-mm-dd')+14
or actual_date between to_date('2004-01-01','yyyy-mm-dd')-14 and to_date('2004-01-01','yyyy-mm-dd')+14
select * from table
where
(conditions
and
estimate_date between to_date('2004-01-01','yyyy-mm-dd')-14 and to_date('2004-01-01','yyyy-mm-dd')+14)
or
(conditions
and
actual_date between to_date('2004-01-01','yyyy-mm-dd')-14 and to_date('2004-01-01','yyyy-mm-dd')+14)?
只要说一些建设性的东西就会有分的啊,呵呵~~~
:-)
select * from table
where
(conditions
and
estimate_date - to_date('2004-01-01','yyyy-mm-dd') between -14 and 14)
or
(conditions
and
actual_date - to_date('2004-01-01','yyyy-mm-dd') between -14 and 14)