Working with a select statement, I only want to pull the last 2 years data. So in the where clause I currently use:
where insert_datetime >= trunc(sysdate - 730).
I would like to know.. if you can set a constant variable of CalcDate where CalcDate = trunc(sysdate - 730) and just reference this declared variable within the where clause. Example... where insert_datetime >= CalcDate etc.
Help is appreciated.
Thanks
where insert_datetime >= trunc(sysdate - 730).
I would like to know.. if you can set a constant variable of CalcDate where CalcDate = trunc(sysdate - 730) and just reference this declared variable within the where clause. Example... where insert_datetime >= CalcDate etc.
Help is appreciated.
Thanks