in reply to counting number of working days

One of my requirement is to count number of working days between two given dates.

Since "working days" can be a substantial headache to define algorithmically, one brute-force method is to create a table (in Oracle, in your case) that stores attributes for dates. It's ugly, but it works, and it lets you do things like

SELECT COUNT(*) FROM dates WHERE dates.ymd > ? AND dates.ymd < ? AND dates.isWorkingDay = 1
This approach lets you have columns for stuff like

The downside of this approach is performance. The upside is that the table is fairly small, and once you've got it populated, everyone who cares gets consistent results. It's also possible to extend the table by adding columns.

Those who've done any data warehousing (quick intro here) will recognize this as a dimension table.