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

  • From: "Charudatta Joshi" <joshic@xxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 2 Aug 2004 11:35:18 +0530

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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: