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: Need assistance with a 'VIEW'.

RE: Need assistance with a 'VIEW'.

From: <Jared.Still_at_radisys.com>
Date: Wed, 19 Sep 2001 17:17:22 -0700
Message-ID: <F001.00393229.20010919170520@fatcity.com>

Create views on the fly?

Ugh. Sorry, but that's really ugly IMO.

It would be much easier to use a refcursor.

Example follows.

Jared

var tables_rc refcursor;

prompt Table Owner?:
col cowner noprint new_value uowner
set term off feed off
select upper('&1') cowner from dual;
set term on feed on

begin

   open :tables_rc for
   select table_name, tablespace_name
   from all_tables
   where owner = '&&uowner';

end;
/

print tables_rc;

undef 1


                                                                                       
                                   
                    "Ramon Estevez"                                                    
                                   
                    <com.banilejas_at_codet       To:     Multiple recipients of list 
ORACLE-L <ORACLE-L_at_fatcity.com>        
                    el.net.do>                 cc:                                     
                                   
                    Sent by:                   Subject:     RE: Need assistance with a 
'VIEW'.                            
                    root_at_fatcity.com                                                   
                                   
                                                                                       
                                   
                                                                                       
                                   
                    09/19/01 07:00 AM                                                  
                                   
                    Please respond to                                                  
                                   
                    ORACLE-L                                                           
                                   
                                                                                       
                                   
                                                                                       
                                   




Hi,
Someone posted the past week the solution of something like that.

He referred to create package and pass the date as a parameter to it and have a procedure, inside the package, that create the view using the parameter date.

That what I can recall.

Good luck,

Ramon E. Estevez
com.banilejas_at_codetel.net.do <mailto:com.banilejas_at_codetel.net.do> 809-565-3121

-----Mensaje original-----

De: root_at_fatcity.com [mailto:root_at_fatcity.com]En nombre de William Rogge Enviado el: Tuesday, 18 September, 2001 10:47 AM Para: Multiple recipients of list ORACLE-L Asunto: Need assistance with a 'VIEW'.

I have been given the nice task of creating a view of some data in our database.

This doesn't seem like a major task, but after 2 days of work, I am stumped.

Given table 'table1'

   code1,
   code2,
   date,
   value1,
   value2

I need to produce a view showing

   code1,
   code2,
   sum(value1),
   sum(value2)
  where date < 'user input date'

I have not been able to get the view to prompt for the date to limit the sum
by.

Specifics:
  Oracle RDMBS 7.3.4
  Server: Unix

What else can I say, but I am totally stumped. HELP!
--

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

Author: William Rogge
  INET: William_Rogge_at_voltek.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

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

Author: Ramon Estevez
  INET: com.banilejas_at_codetel.net.do

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

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

Author:
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Sep 19 2001 - 19:17:22 CDT

Original text of this message

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