using subquery how can i calculate working days in a month?
Answer Posted / mayru
SELECT COUNT( *)
FROM
(SELECT ROWNUM RNUM
FROM ALL_OBJECTS
WHERE ROWNUM <= TO_DATE('01-OCT-2011') - TO_DATE('01-SEP-2011') + 1
)
WHERE TO_CHAR(TO_DATE('01-SEP-2011') + RNUM - 1, 'DY') NOT IN('SAT', 'SUN');
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why do we use joins?
How you improve the performance of sql*loader? : aql loader
Is sqlite free?
What are the different operators available in sql?
Is left join inner or outer?
what is the difference between a web-garden and a web-farm? : Sql dba
Define a temp table?
What is a sql profiler?
what is try_catch block in procedure
What is sql character function?
What is the difference between the sql*loader and import utilities? : aql loader
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
How do you remove duplicate records from a table?
Can we create view in stored procedure?
What are different functions in sql?