Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3466: Removed CalculatedDataElement

2011-04-29 Thread Hieu Dang Duy
Yes, thank you Jason for modifying on this statement. I tried then it's working fine. P.S: To check this function's returned result just using this: SELECT * FROM migrate_cdes() 2011/4/28 Jason Pickering jason.p.picker...@gmail.com This is a start maybe for postgres. CREATE OR REPLACE

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3466: Removed CalculatedDataElement

2011-04-28 Thread Jason Pickering
This is a start maybe for postgres. CREATE OR REPLACE FUNCTION migrate_cdes() RETURNS INTEGER AS $BODY$ DECLARE this_indicatortypeid integer; BEGIN SELECT INTO this_indicatortypeid indicatortypeid From IndicatorType Where Indicatorfactor = 1 LIMIT 1; EXECUTE 'INSERT INTO indicator (

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3466: Removed CalculatedDataElement

2011-04-27 Thread Lars Helge Ă˜verland
I also believe that a SQL script would be appropriate for this and it seems Hieu is conceptually right here.. Lars On Mon, Apr 25, 2011 at 9:19 AM, Jason Pickering jason.p.picker...@gmail.com wrote: Hi Hieu, Yes, this is along the same lines of what I was thinking, but was not as quick

Re: [Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3466: Removed CalculatedDataElement

2011-04-25 Thread Hieu Dang Duy
Hello Jason, In this case, I think we have to make a store procedure or something like this statement to convert from CDEs to Indicator as: Declare @IndicatorTypeId; Set @IndicatorTypeId = (Select indicatortypeid From IndicatorType Where Indicatorfactor = 1); INSERT INTO indicator (