periodstructure giving errors...

So=2C the period 1589=3B6=3B"2010-02-01"=3B"2010-02-28 =2C points to a year=
ly period type=2C which is not a year in duration. You are going to need to=
get rid of it. You will need to do something like
SELECT COUNT(*) FROM datavalue where periodid =3D 1589=3B=20
If you have any records with this periodID=2C you are going to need to reso=
lve these. This period looks to be monthly=2C so if the data is also monthl=
y=2C you should be able to reassign it to a monthly period which starts in =
2010-02-01 and ends in 2010-02-28=2C if it is already there. You could try =
"SELECT * FROM period where startdate =3D '2010-02-01'::date=3B" and see if=
you get multiple periods for Feb 2010. If you have multiple periods for Fe=
b 2010=2C then you need to do something like
UPDATE datavalue set periodid =3D ???=20
where ??? is the periodid of the "real" Feb 2010 period.=20
Then you should get rid of the bogus Feb 2010 period=20
DELETE FROM period where periodid =3D 1589=3B
After that=2C you should clear your cache from Data administration.=20
Do not try any of this on a production database!!!


On Mon=2C Sep 15=2C 2014 at 12:14 PM=2C Moemedi Ntunyane <moemedi.ntunyane@=> wrote:
Hi Jason

Thanx=2C I just run the query you gave and no records were available and re=
moved not =3D year(!=3Dyear) and records where available. The date format i=
s available as:


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

Moemedi Ntunyane
Co-founder KeyInConsulting