Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> sql
Hi
I need to create a view where the code looks something like below.
create or replace view myview as
select col1, col2, (col1/col2)*1000000 col3
from mytable
However, it is possible that col2 contains some zero values and when there zeroes the view will break. I want col3 (calculated) to be 0 when col2 is 0. How do I change the sql to do just that with using UNION?
Thanks
Daud
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 04 1999 - 04:56:28 CDT