Re: divide with decode

2001-08-06 Thread Jared Still
: divide with decode Now why didn't I think of that? :) Jared -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jared Still INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051 San Diego, California-- Public

Re: divide with decode

2001-08-04 Thread Jon Walthour
Srinivas: What you're looking to do is find the value of physical reads/db block gets. So, you want the value1/value2 where value1 is 'physical reads' and value2 is 'db block gets'. So, what you need to do is put the literals 'physical reads' and 'db block gets' in the where clause somehow

RE: divide with decode

2001-08-04 Thread Larry Elkins
recipients of list ORACLE-L Subject: divide with decode hi lists can anybody help me for the flwng : i need to do calculation dividing phy reads value/db block gets i am following the principle select decode(name,'physical reads',value)/decode(name,'db block gets',value) from v$sysstat where

divide with decode

2001-08-04 Thread Tatireddy, Shrinivas (MED, Keane)
hi lists can anybody help me for the flwng : i need to do calculation dividing phy reads value/db block gets i am following the principle select decode(name,'physical reads',value)/decode(name,'db block gets',value) from v$sysstat where name in ('db block gets','physical reads') just this

Re: divide with decode

2001-08-04 Thread Jared Still
Srinivas, That's because the values are in 2 different rows. Notice that your query returns 2 rows. One row will have the 'db block gets', the other will have the 'physical reads'. This will do it: select a.value/b.value from v$sysstat a, v$sysstat b where a.name = 'physical reads' and