Subscribe to this feed

Navigation

Recent Posts

Archive

Oracle SQL*Plus Last Full Month

Saturday 24 Mar, 2007 - 18:15pm | 1 comments |

Although Crystal Reports has a built in LastFullMonth function SQL*Plus doesn't.

If you want to use SQL*Plus for your report and want the date parameter to be dynamic you can do so by manipulating sysdate and using some of the built in date functions.

Here is how

select * from db_table
where date_col between add_months((last_day(sysdate))+1,-2) AND add_months((last_day(sysdate))+1,-1)

Posted in: Business
Tags: Oracle | SQL*Plus | Dates | Crystal Reports

Comment
 | Link | back to top | del.icio.us digg it furl reddit

..

Thursday 29 Mar, 2012 - 17:04pm
Thanks for the post.

Posted by: Anonymous


© Eriginal Ltd 2011, all rights reserved