Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: how do I select all column plus an alias via a query
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