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

Home -> Community -> Usenet -> c.d.o.misc -> Re: column aliases in views

Re: column aliases in views

From: William Robertson <williamr2019_at_googlemail.com>
Date: 14 Jan 2007 01:18:18 -0800
Message-ID: <1168766298.848739.323040@11g2000cwr.googlegroups.com>


Filipe David Borba Manana wrote:
> Jerome Vitalis wrote:
> > Filipe David Borba Manana wrote:
> >
> >> Replacing accountname with
> >> NVL(get_value(hostname,'/system/accounting/name'), 'undefined') works,
> >> although is not very elegant.
> >>
> >
> > Hadn't you read my answer which suggested to do so a long time ago? ;-)
>
> Yes, and I tried it. I was just trying to figure out if there was a more
> elegant alternative :)
> It seems there isn't any.
>
> Many thanks,
>
> Manana

Well obviously you could nest the query that defines the "accountname" and other expressions and refer to in in an outer query.

btw as well as POWER() being an existing SQL function (though you seem to get away with it somehow), is it possible for just one of the two "get_value" expressions to return NULL, in which case adding them together will return NULL, which the view will NVL into 0? If so, is that the result you want? Received on Sun Jan 14 2007 - 03:18:18 CST

Original text of this message

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