From: Marvin <magosoft@gmx.net>
To: pgsql-admin@postgresql.org
Subject: Sub-Select problem
Date: Thu, 17 Jul 2003 16:03:13 -0600
Message-ID: <3F171D21.000005.03704@guaj215desa> (raw)
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
Attachments:IMSTP.gif (image/gif, 494B) downloadview image
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: magosoft@gmx.net
Subject: Re: Sub-Select problem
In-Reply-To: <3F171D21.000005.03704@guaj215desa>
References: <3F171D21.000005.03704@guaj215desa>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox