This is the result of my automatic translater :
select to_date(cast(extract ( month from add_months(sysdate ,-1) ) as varchar2(20)) || '/01/' || cast(extract ( year from sysdate -1 ) as varchar2(20)),'MM/DD/YYYY') as Start_Month,
to_date(cast(extract ( month from sysdate ) as varchar2(20)) || '/01/' || cast(extract ( year from sysdate -1 ) as varchar2(20)),'MM/DD/YYYY') -1 as End_Month
Think to do it using Oracle functions ( LAST_DAY,...) : it will be more easy to understand.
The only two drawbacks of Thompbil's solution are the fact that there's no function like "FIRST_DAY" in Oracle (at least not up to 10g release 2). Check list of Oracle datetime (and other SQL funcions) here.
The other one is that Oracle (unlike SQL Server, which is easier to use) requires two closed parenthesis if two of them are opened:
Originally Posted by Thompbil
FIRST_DAY(ADD_MONTHS(SYSDATE, - 1) Start_month
However, great job, Thompbil! If this query really is to return the firt and the last day of previous month, your query needs just a little tuning: to fetch the first day, you'll have to find the last day in August (regarding it is October now) and add yet another day to find the first day in September. Something like this: