← Back to team overview

dhis2-devs team mailing list archive

Re: help with the query

 

Hi bob,
thanks for the response, I am using two different odbc datasource. one for
the dhis2  and the other the znzMay database.

On Tue, Sep 29, 2009 at 9:59 AM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> Hi Yusuph
>
> I haven't got excel to cross-check but I wonder if you are still
> "connected" to dhis2 database when you try to make the query to the other
> one.  Is that how it works?  You first setup a datasource then execute a
> query on it.  If you just change the query you would then get this error.
> You also need to set up the connection again.
>
> Sorry if I'm way off the mark.
>
> Regards
> Bob
>
> 2009/9/29 Yusuph Kassim <yusuphk@xxxxxxxxx>
>
>> this is the query that doesnt work
>> SELECT pivotsource_indicator_ou4.indicator,
>> pivotsource_indicator_ou4.orgunit1, pivotsource_indicator_ou4.ou1,
>> pivotsource_indicator_ou4.orgunit2, pivotsource_indicator_ou4.ou2,
>> pivotsource_indicator_ou4.orgunit3, pivotsource_indicator_ou4.ou3,
>> pivotsource_indicator_ou4.orgunit4, pivotsource_indicator_ou4.ou4,
>> pivotsource_indicator_ou4.periodid, pivotsource_indicator_ou4.periodtype,
>> pivotsource_indicator_ou4.year, pivotsource_indicator_ou4.month,
>> pivotsource_indicator_ou4.period, pivotsource_indicator_ou4.numxfactor,
>> pivotsource_indicator_ou4.factor, pivotsource_indicator_ou4.numeratorvalue,
>> pivotsource_indicator_ou4.denominatorvalue,
>> pivotsource_indicator_ou4.annualized, pivotsource_indicator_ou4.level
>> FROM dhis2_znzmay.public.pivotsource_indicator_ou4
>> pivotsource_indicator_ou4
>>
>> and this is the query that works
>>
>> SELECT pivotsource_indicator_ou4.indicator,
>> pivotsource_indicator_ou4.orgunit1, pivotsource_indicator_ou4.ou1,
>> pivotsource_indicator_ou4.orgunit2, pivotsource_indicator_ou4.ou2,
>> pivotsource_indicator_ou4.orgunit3, pivotsource_indicator_ou4.ou3,
>> pivotsource_indicator_ou4.orgunit4, pivotsource_indicator_ou4.ou4,
>> pivotsource_indicator_ou4.periodid, pivotsource_indicator_ou4.periodtype,
>> pivotsource_indicator_ou4.year, pivotsource_indicator_ou4.month,
>> pivotsource_indicator_ou4.period, pivotsource_indicator_ou4.numxfactor,
>> pivotsource_indicator_ou4.factor, pivotsource_indicator_ou4.numeratorvalue,
>> pivotsource_indicator_ou4.denominatorvalue,
>> pivotsource_indicator_ou4.annualized, pivotsource_indicator_ou4.level
>> FROM dhis2.public.pivotsource_indicator_ou4 pivotsource_indicator_ou4
>>
>> On Tue, Sep 29, 2009 at 9:51 AM, Yusuph Kassim <yusuphk@xxxxxxxxx> wrote:
>>
>>> Hello Jason,
>>> I did remove in the query but I am getting the same error.
>>>
>>> in short I am using the query in two connection, one connection to dhis2
>>> database and the next to dhis2_znzMay, the dhis2 works though all the
>>> properties are the same as those in the znzMay. and still getting the error.
>>>
>>> and yes I am using 2007
>>>
>>>
>>> On Tue, Sep 29, 2009 at 9:30 AM, Jason Pickering <
>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>
>>>> It appears that the name of the database in the dhis2_zmmay is showing
>>>> up in the Excel query.  This should not be necessary. You will need to
>>>> edit the query source directly in Excel, and remove that.
>>>>
>>>> It looks like you are using Office 2007? You can do this directly I
>>>> think, although I have not used Office2007 that much so I do not know
>>>> the exact procedure. Otherwise, on Office 2003, you can download
>>>> PivotPlayPlus add-in http://www.contextures.com/xlPivotPlayPLUS01.html
>>>>
>>>> Regards,
>>>> jason
>>>>
>>>
>>>
>>>
>>> --
>>> Yusuph Kassim Kulindwa,
>>> University of Dar Es Salaam,
>>> Department of Computer Science,
>>> System Developer/ Research Assistant.
>>>
>>> Cell: +255 713 535648
>>>
>>
>>
>>
>> --
>> Yusuph Kassim Kulindwa,
>> University of Dar Es Salaam,
>> Department of Computer Science,
>> System Developer/ Research Assistant.
>>
>> Cell: +255 713 535648
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>


-- 
Yusuph Kassim Kulindwa,
University of Dar Es Salaam,
Department of Computer Science,
System Developer/ Research Assistant.

Cell: +255 713 535648

References