Sub-Select problem

From: "Marvin" <magosoft(at)gmx(dot)net>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Sub-Select problem
Date: 2003-07-17 22:03:13
Message-ID: 3F171D21.000005.03704@guaj215desa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I was trying to do something like this.

Select Field1, Field2, Total
FROM
(Select Field1, Field2, SUM(Field3) as Total
From TableA
Where DateHired <= CAST('08/01/2003' AS DATE)
GROUP BY Field1) as MyTable;

The sub-select query tested alone returns me a lot of rows,
however when I make all the query it returns me nothing.

Please help!!!
I'm in rush.

Thank you in advanced for ANY suggestion,

MAGO

Browse pgsql-admin by date

  From Date Subject
Next Message Marvin 2003-07-17 22:26:44 Re: Sub-Select problem
Previous Message Charles Haron 2003-07-17 21:34:37 Adding PL/Perl