Hi Lars, I also reported this problem on the Bug list here: https://bugs.launchpad.net/dhis2/+bug/1313954.
It happens either when you import from another system so you have period type id = 3 both end dates in year 9999. Another scenario is when you run the manual aggregate query and choose a non-full month e.g 1 Feb 2013 to 16 June 2014. This always inserts an additional monthly period into the table with start date 16-June and end date 16-June. I suspect that this will happen if you are aggregating for a monthly period data set. Regards, Busoye On 16 Jun 2014, at 15:39, Lars Helge Øverland <[email protected]> wrote: > Hi Sumudu, > > my guess is that someone has done manual inserts of periods in the period > table, and that you have a mismatch between the period (start / end date) and > the period type. E.g. you have periods which are days but has the monthly > period type. Please investigate this. This SQL will give you the overview: > > select * from period p join periodtype pt on p.periodtypeid=pt.periodtypeid; > > This sql will set daily period type on day periods: > > update period set periodtypeid=1 where startdate=enddate; > > > regards, > > Lars > > > > > > > > > > > > > On Mon, Jun 9, 2014 at 4:30 AM, sumudu weerasinghe <[email protected]> > wrote: > Dear all, > I have customized dhis2 for mental health requirement. > After data element ,org unit, attribute creation Resources table generation > work well and resource table generated at 2014-06-09 00:43:02 > Then follow these steps to aggregate data from tracke > Develop aggregate query builder > enter one patient data for 2014 June > Manual aggregate data - ( success and show data in database ) > Try to generate Resource table - fail and give erro massage at 2014-06-09 > 00:47:49 as follow > I try this in demo site but it is not authorize to generate resource table > Process failed: PreparedStatementCallback; SQL [insert into _periodstructure > values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; Duplicate entry '201406' for key > 'in_periodstructure_iso'; nested exception is java.sql.BatchUpdateException: > Duplicate entry '201406' for key 'in_periodstructure_iso' > > I will attach my log file and screen shot. > I am using > dhis 2.15 > Build revision: 15123 > Database type: Mysql > OS name:Windows 7 > OS architecture:x86 > > Can any one help to come out from this? > > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-users > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dhis2-users > More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

