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

Home -> Community -> Usenet -> c.d.o.tools -> Code Help

Code Help

From: Tony Walby <tony.walby_at_bridgewatersystems.com>
Date: Tue, 14 Nov 2000 10:48:19 -0500
Message-ID: <3A115EC3.22D7B28B@bridgewatersystems.com>

Could someone tell me what is wrong with this code. spool size_test1.lst

prompt 'Enter a choice: 1.2.3' &&choice: declare var size number;
If &&choice = 1

   size := 15000000;
elseif &&choice = 2

   size := 7500000;
elseif &&choice = 3

   size := 3500000;
else
  size := 500000;

select ds.owner "OWNER",

       dt.table_name   "Table Name",
       (ds.bytes/dt.num_rows) * size    "Optimal Initial"
from

   dba_segments ds, dba_tables dt
where

   ds.owner = 'R22' and
   dt.owner = 'R22' and
   ds.segment_name = dt.table_name and
   ds.segment_type = 'TABLE' and
   dt.num_rows > 0

order by
 1,2,3
/
spool off Received on Tue Nov 14 2000 - 09:48:19 CST

Original text of this message

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