Hi Jason

Thanx, I just run the query you gave and no records were available and removed 
not = year(!=year) and records where available. The date format is available as:

1573;6;"2010-01-01";"2010-01-31"
1589;6;"2010-02-01";"2010-02-28"

The error available shows that there is key violation for null values for iso 
column in the periodstructure table.



Moemedi Ntunyane
Co-founder KeyInConsulting


Date: Mon, 15 Sep 2014 11:46:07 +0200
Subject: Re: [Dhis2-devs] periodstructure giving errors...
From: jason.p.picker...@gmail.com
To: moemedi.ntuny...@hotmail.com
CC: dhis2-devs@lists.launchpad.net

Very likely you have an invalid period in the periods table. 
Can you run this and see what happens?
SELECT * FROM period where age(enddate,startdate) != '1 year'::interval and 
periodtypeid = (SELECT periodtypeid from periodtype where name = 'Yearly');

Also, you should get an error which will help you to decipher which period is 
not correct , something like 
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value 
violates unique constraint "in_periodstructure_iso"  Detail: Key (iso)=(1995) 
already exists.
Best regards,Jason

On Fri, Sep 12, 2014 at 5:03 PM, Moemedi Ntunyane 
<moemedi.ntuny...@hotmail.com> wrote:



Hi All

I have this problem while generating the resource tables...all other tables are 
fine except periodstructure...

Process
 failed: PreparedStatementCallback; SQL [insert into _periodstructure 
values (?,?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR: null value in column "iso" 
violates not-null constraint; nested exception is 
org.postgresql.util.PSQLException: ERROR: null value in column "iso" 
violates not-null constraint  

Regards,

Moemedi Ntunyane
Co-founder KeyInConsulting
                                          

_______________________________________________

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.picker...@gmail.com
tel:+46764147049
                                          
_______________________________________________
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

Reply via email to