Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Creation of a column based on values of other columns, help please!
Hai
Below query may help you.
create view v1 as
(select n1, n2 ,
decode(sign(n1),1,'true',-1,'true',decode(sign(n2),0,'false','true')) TF
from table1)
/
Regards
Suresh Kumar
Mark Tortolano wrote:
> Hi, I want to create a View based on a table in Oracle. I've got two
> columns in the table with numeric values that indicate user
> preferences. I want to create a third column in this view that will
> have a true/false value that will be "true" if either of the other
> columns has a non-zero number in it.
>
> Is it possible to do this in SQL alone, perhaps using DECODE? Or would
>
> I have to use PL/SQL to create the view. If so, how?
>
> Thanks in advance,
>
> Mark Tortolano
>
Received on Fri Apr 24 1998 - 05:52:10 CDT
![]() |
![]() |