From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Group by minute
Date: Fri, 22 Sep 2006 09:56:02 -0500
Message-ID: <1158936962.5218.4.camel@localhost.localdomain> (raw)
In-Reply-To: <55c095e90609220652t356c8591u412046aed091a52f@mail.gmail.com>
References: <55c095e90609220652t356c8591u412046aed091a52f@mail.gmail.com>
On Fri, 2006-09-22 at 10:52 -0300, Ezequias Rodrigues da Rocha wrote:
> Hil list,
>
> I have a query but my IDE (Delphi) does not accept "to_char"
> capability. Is there a way to reproduce the same query without using
> to_char function ?
>
> Here is my query:
> SELECT to_char(quando,'dd/MM/yyyy HH24:MI'),count(id)
> FROM base.tentativa
> WHERE (SESSAO_ID = 15)
> GROUP BY to_char(quando,'dd/MM/yyyy HH24:MI')
> order by 1
>
Assuming that your IDE has the same issues with date_trunc, you could
always put things into a view...
in psql do something like:
create view frozen_caveman_ide as
SELECT to_char(quando,'dd/MM/yyyy HH24:MI'),
count(id) FROM base.tentativa
GROUP BY to_char(quando,'dd/MM/yyyy HH24:MI');
then just call the view when you need that.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: smarlowe@g2switchworks.com, ezequias.rocha@gmail.com
Subject: Re: Group by minute
In-Reply-To: <1158936962.5218.4.camel@localhost.localdomain>
* 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