On Tue, Feb 17, 2004 at 13:02:43 +0100,
Holger Marzen <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> if I have something like this:
>
> SELECT column1,
>(... complicated subselect ...),
>column1 - (... same subselect as above ...)
> FROM table1;
>
> do I really have to rewrite the su
temporary tables work. Save the complicated
subselect in temporary table, following
queries just simple select on temp table.
Holger Marzen wrote:
Hi all,
if I have something like this:
SELECT column1,
(... complicated subselect ...),
column1 - (... same subselect as above ...)
FRO
Depend in the exact query, you can do:
SELECT column1, x.c, column1-x.c
FROM table1, (... complicated subselect ...) as x;
The above may not work if they're correlated, so you can try:
SELECT column1, column2, column1-column2
FROM
(SELECT column1, (... complicated subselect ...) as column2
Hi all,
if I have something like this:
SELECT column1,
(... complicated subselect ...),
column1 - (... same subselect as above ...)
FROM table1;
do I really have to rewrite the subselect a 2nd time if I need that
result in another column's expression?
---(e