Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to count working days?
"Grzesiek" <grzesiek_at_altavista.net> a écrit dans le message news: 9kp23c$sog$1_at_news.tpi.pl...
> Hi!
> Sorry for such easy question but I've spent preety much time on that before
> asking for help .
>
> I've got DATE_1 in TABLE_1 and DATE_2 in TABLE_2.
> I've got table CALENDAR with 2 columns: DATE, WORKING_DAY [Y/N]
> All I need is a sql report with
> DATE_1, DATE_2 and WORKING_DAYS between these two dates.
>
> Thanks in advance,
> Grzesiek
>
You can do something like:
select a.date_1, b.date_2, sum(decode(c.working_day,'Y',1,0)) from calendar c,
(select date_2 from table_2) b, (select date_1 from table_1) a
-- Have a nice day MichelReceived on Wed Aug 08 2001 - 01:22:40 CDT