Home » SQL & PL/SQL » SQL & PL/SQL » Query to find total number of working day, elimnating saturday(s) and sunday(s)
icon14.gif  Query to find total number of working day, elimnating saturday(s) and sunday(s) [message #186900] Thu, 10 August 2006 01:52 Go to next message
johar_diwaker
Messages: 1
Registered: August 2006
Location: Delhi
Junior Member


select (end_date-start_date-(next_day(end_date-7,'SUNDAY') -next_day(start_date-7,'SUNDAY')
+ next_day(end_date-7,'SATURDAY')-next_day(start_date-7,'SATURDAY'))/7)-1 from d1;
Re: Query to find total number of working day, elimnating saturday(s) and sunday(s) [message #186911 is a reply to message #186900] Thu, 10 August 2006 02:19 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Ok, you've got some SQL.
Congratulations.
I'm very happy for you.

Have you written it, and just wanted to share the moment, or is there a problem with it?
Previous Topic: FUNCTION-BASE INDEX for user defined function
Next Topic: Calling Oracle built-in commands using JDBC
Goto Forum:
  


Current Time: Sun Aug 20 12:20:58 CDT 2017

Total time taken to generate the page: 0.09977 seconds