Re: [SQL] Re: [SQL] need some magic with generate_series()

2013-01-23 Thread Andreas
I'm sorry to prove that daft. :( generate_series needs the startdate of every project to generate the specific list of monthnumbers for every project. To join against this the list needs to have a column with the project_id. So I get something like this but still I cant reference the columns

[SQL] Re: [SQL] need some magic with generate_series()

2013-01-22 Thread Alexander Gataric
Create a CTE with the project code and starting month of the project. Left join to month series CTE. Sent from my smartphone - Reply message - From: "Andreas" To: "Alexander Gataric" Cc: "Filip RembiaƂkowski" , "jan zimmek" , Subject: [SQL] need some magic with generate_series() Date

[SQL] Re: [SQL] need some magic with generate_series()

2013-01-22 Thread Alexander Gataric
I would create a common table expression with the series from Filip and left join to the table you need to report on. Sent from my smartphone - Reply message - From: "Andreas" To: "Filip RembiaƂkowski" Cc: "jan zimmek" , Subject: [SQL] need some magic with generate_series() Date: Tue,