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

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with Computed Column

Re: Problem with Computed Column

From: Haximus <e_at_t.me>
Date: Mon, 28 Feb 2005 09:33:54 GMT
Message-ID: <6ABUd.12017$LN5.1570@edtnps90>


"TheanKeong" <theankeong_at_gmail.com> wrote in message news:1109579663.133669.275200_at_g14g2000cwa.googlegroups.com...
> Thanks JJ Reynolds,
> I think u actually got my point there. Actually I am migrating my DB
> from ASA to Oracle.The SQL statement actually works perfectly well in
> ASA for some years.
>
> The PD_TYPE column is indeed selected from dbo.party_dtl as a compute
> column. The resulting value is then being validated using the CASE
> section to produce the party_type column for the view. The intention of
> this view is to be displayed in Powerbuilder's datawindow.
>
> However when i ran the SQL in ISQL Plus, the error occured at the CASE
> line indicating that PD_TYPE is an invalid identifier.
>
> I somehow suspect that aliased columns might not be able to be
> referenced in functions such as CASE, NVL etc.. because i faced the
> same problem for my NVL functions in Oracle.
>
> And thanks for the quotations thing, i will remember to remove it when
> my i start doing the real migration.

The way you've got the view defined written seems really odd, as the select statement does not start with SELECT, but instead a single column sub-select (which will only work if the sub-query returns one row). I find it strange that Oracle doesn't barf on this even before the invalid identifer error. Received on Mon Feb 28 2005 - 03:33:54 CST

Original text of this message

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