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

Home -> Community -> Usenet -> c.d.o.tools -> Re: how do I select all column plus an alias via a query

Re: how do I select all column plus an alias via a query

From: Johannes Wahl <johannes.wahl_at_gnc.at>
Date: Fri, 02 Mar 2001 09:01:14 +0000
Message-ID: <3A9F615A.73A20688@gnc.at>

you have to include the tablename, then it works:

SELECT
    Bonus.*,
    SAL + COMM AS TOTAL
FROM
    SCOTT.BONUS; u545532226_at_spawnkill.ip-mobilphone.net schrieb:

> I'm trying to get all of the fields of a table, plus a calculated
> column via a select query. Other databases (SQL Server, Access)
> can handle this functionality. If oracle can't, I will have to work
> around it. (A view on the server is not an option because the selects
> are dynamically created)
>
> An example of what I would want:
> SELECT *, SAL + COMM AS TOTAL FROM SCOTT.BONUS;
>
> The error message "ORA-00923: FROM keyword not found where expected"
> appears when this is run. (I'm running Oracle 8)
>
> Thanks in advance for any help.
>
>
> --
> Sent by jteipel from patientcentrix included in com
> This is a spam protected message. Please answer with reference header.
> Posted via http://www.usenet-replayer.com/cgi/content/new
  Received on Fri Mar 02 2001 - 03:01:14 CST

Original text of this message

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