On 2010-03-08, query wrote:
> --=_484d28810a276e7b5e461f0328ee205f
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> I want to display data for all days in a month even if no data
> exists for that month. Some of the days in a month might not have any
> data
It looks like a procedural problem.
I would solve it in plpgsql.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On Mon, Mar 8, 2010 at 13:25, query wrote:
>
> Hi,
>
> I want to display data for all days in a month even if no data exists for
> that month. Some of the days in a month might not have any data at all. With
> normal query, we can display days only if data exists.But I want to display
> rows fo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
One approach could be:
You build a table with month information over which you are willing to
show data from another table.
Then you just cross join your data table and the data in your month table.
Here is some code I use for generating the table
urphy
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of query
Sent: Monday, March 08, 2010 5:25 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] list of all months
Hi,
I want to display data for all days in a month even if no data exists for that
m
Hi,
I want to display data for all days in a month even if no data exists for that
month. Some of the days in a month might not have any data at all. With normal
query, we can display days only if data exists.But I want to display rows for
all days in a month with blank data for non-existing da