Select records from table1 where sysdate - t_date>1095 or
select records from table1 where t_date>=(add_months(sysdate)+36)
Regards
Shadab
----- Original Message -----
From: "Ovidiu Turcean "
<oracledba-ezmlmshield-x18276174.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Friday, September 28, 2007 12:02 PM
Subject: RE: current date minus exactly 3 years
> Maybe
>
> SELECT *
> FROM table t
> WHERE months_between(SYSDATE, t.date_column) >= 36
>
>
> -----Original Message-----
> From: Alan Vervaeke
> [mailto:oracledba-ezmlmshield-x93019633.[Email address protected]
> Sent: Thursday, September 27, 2007 8:34 PM
> To: LazyDBA Discussion
> Subject: current date minus exactly 3 years
>
> Sorry, but I am experiencing intra-cranial flatulence.
>
>
>
> A simple query to select records where record date is greater than or
> equal to sysdate minus 3 years??
>
>
>
> Anyone? Bueller ?? Bueller ??
>
>
>
> Alan
>
>
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
>
Oracle LazyDBA home page