pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marvin <magosoft@gmx.net>
To: rafael@control-lab.com.br
Cc: pgsql-admin@postgresql.org
Subject: Re: Sub-Select problem
Date: Thu, 17 Jul 2003 16:26:44 -0600
Message-ID: <3F1722A4.000003.03704@guaj215desa> (raw)
References: <008001c34cb1$b40bcb20$0b00a8c0@controllab.com.br>

I executed the same query on a command line console and it worked
I think the problem is that I'm using EMS PostgreSQL Manager and
it does not return me anything from the SQL Editor.

Thank you for the help.

MAGO
 
-------Mensaje original-------
 
De: Rafael de Almeida Balthazar
Fecha: Jueves, 17 de Julio de 2003 04:23:23 p.m.
A: Marvin
Asunto: Re: [ADMIN] Sub-Select problem
 
I executed this same query and all the rows have been showed. The only
problem was I had to include field2 in the group by statement.
I am running postgresql 7.2.3-5.80 over Red Hat 8.

----- Original Message ----- 
From: Marvin
To: pgsql-admin@postgresql.org
Sent: Thursday, July 17, 2003 7:03 PM
Subject: [ADMIN] Sub-Select problem


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


_________________________________________________________________
IncrediMail - El E-mail ha evolucionado finalmente - Haga clic aquĆ­

. 

Attachments:

IMSTP.gif (image/gif, 494B) download view image

view thread (2+ messages)

Message-ID: <3F1722A4.000003.03704@guaj215desa>
Permalink:  ../3F1722A4.000003.03704@guaj215desa/
Also on:    postgresql.org/message-id/3F1722A4.000003.03704@guaj215desa

 · 

reply

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, rafael@control-lab.com.br
  Subject: Re: Sub-Select problem
  In-Reply-To: <3F1722A4.000003.03704@guaj215desa>
  References: <008001c34cb1$b40bcb20$0b00a8c0@controllab.com.br> <3F1722A4.000003.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