Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to generate the output w/o using temp table

RE: how to generate the output w/o using temp table

From: Charudatta Joshi <joshic_at_mahindrabt.com>
Date: Mon, 2 Aug 2004 11:35:18 +0530
Message-ID: <MHEAIPLKCACENJKNJIALGEOCCDAA.joshic@mahindrabt.com>

Hello,

>>will all users be able to access the all objects.
[CJ] I think so, although you can use any of your application {CJ] tables with 100-500 rows instead of ALL_OBJECTS.

>>my user wants to query for certain range of month who are on-vacation?
>>example: user enter starting date 10/2004 ending date: 02/2005
[CJ] Add this date range condition as predicate to the original query.

SELECT id,

        TO_CHAR(mnth, 'MM/YYYY')
FROM tmp a,

          (select trunc(add_months(sysdate, - rownum + 1), 'MM') mnth 
           from all_objects
           union all
           select trunc(add_months(sysdate, rownum), 'MM') mnth 
           from all_objects) b

WHERE b.mnth > a.startdate and a.mnth <= enddate AND a.startdate <= :stdt
AND a.enddate => :enddt

Regards,
Charu.



Disclaimer:

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.



Visit us at http://www.mahindrabt.com

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon Aug 02 2004 - 01:00:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US