Period name based on startdate or enddate?

DearCommunity,

We are running SQL code to output data from the SQL View module. We get the following table for an organization unit accross multiple periods containing results with startdate and enddate. We have set up the period to “Monthly”.

In order to output the Period name (i.e. January 2017 or 201701), shoud we consider the sartdate or enddate (from period table)? Here in this example, we could observe the month repeating both for startdate and enddate. In our understanding, each value for each category should be unique for each month. Or is there another table containing already the period name that we have to base the SQL query?

Thank you for your support!

Kind Regards,

Tantely.

This message and its attachments are confidential and solely for the intended recipients. If received in error, please delete them and notify the sender via reply e-mail immediately.

Hi Tantley,

Have a look at the “_periodstructure” resource table. The name of the period is there.

Regards,

Jason

image

···

On Thu, Feb 16, 2017 at 8:36 AM, Raminosoa Rabemanantsoa, Tantely traminosoa@mikolo.org wrote:

DearCommunity,

We are running SQL code to output data from the SQL View module. We get the following table for an organization unit accross multiple periods containing results with startdate and enddate. We have set up the period to “Monthly”.

In order to output the Period name (i.e. January 2017 or 201701), shoud we consider the sartdate or enddate (from period table)? Here in this example, we could observe the month repeating both for startdate and enddate. In our understanding, each value for each category should be unique for each month. Or is there another table containing already the period name that we have to base the SQL query?

Thank you for your support!

Kind Regards,

Tantely.

This message and its attachments are confidential and solely for the intended recipients. If received in error, please delete them and notify the sender via reply e-mail immediately.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hi Jason,

Yes, it is there. We get it. Thank you!

Regards,

This message and its attachments are confidential and solely for the intended recipients. If received in error, please delete them and notify the sender via reply e-mail immediately.

···

Tantely.

On Thu, Feb 16, 2017 at 10:39 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Tantley,

Have a look at the “_periodstructure” resource table. The name of the period is there.

Regards,

Jason

On Thu, Feb 16, 2017 at 8:36 AM, Raminosoa Rabemanantsoa, Tantely traminosoa@mikolo.org wrote:

DearCommunity,

We are running SQL code to output data from the SQL View module. We get the following table for an organization unit accross multiple periods containing results with startdate and enddate. We have set up the period to “Monthly”.

In order to output the Period name (i.e. January 2017 or 201701), shoud we consider the sartdate or enddate (from period table)? Here in this example, we could observe the month repeating both for startdate and enddate. In our understanding, each value for each category should be unique for each month. Or is there another table containing already the period name that we have to base the SQL query?

Thank you for your support!

Kind Regards,

Tantely.

This message and its attachments are confidential and solely for the intended recipients. If received in error, please delete them and notify the sender via reply e-mail immediately.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049