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 ...)
FROM table1;

do I really have to rewrite the subselect a 2nd time if I need that
result in another column's expression?

-- P. J. "Josh" Rovero Sonalysts, Inc. Email: [EMAIL PROTECTED] www.sonalysts.com 215 Parkway North Work: (860)326-3671 or 442-4355 Waterford CT 06385 ***********************************************************************

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to