Nice one Larry, you solved the puzzle (cursorDict=). Thanks!
On Wed, Jul 15, 2009 at 1:57 PM, <[email protected]> wrote: > Try... > ds = nameDS.execute("select dataset.fullname, curPhone.phone from dataset > join curPhone on dataset.pk=curPhone.fkName",cursorDict={ "curPhone" : > phoneDS }) > > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of tim awa >> Sent: Wednesday, July 15, 2009 12:25 AM >> To: Dabo Users list >> Subject: Re: [dabo-users] Joins on datasets >> >> I actually tried various combinations and nothing worked. >> Each reasonable attempt yields the same error - >> "OperationalError: no such table: curPhone". >> >> The alias curPhone seems to be not pointing to the actual >> dataset which is phoneDS. It traces back to line 372 in >> dabo\db\dDataSet.py >> >> >From the error message, curPhone is the table being queried >> in the sql >> statement w/c may not be the case as the actual dataset is phoneDS. >> Just my thought. >> >> For a workaround, I created a Bizobj for the join. However, >> this dataset join issue still appears as a bug to me. >> >> >> On Wed, Jul 15, 2009 at 11:34 AM, <[email protected]> wrote: >> > Tim, >> > >> > Dunno, looks right. Is it possible that there are no phoneDS.fkName >> > matching nameDS.pk? >> > >> > One possible thing...check to make sure that the field "fkName" is >> > actually spelled (capitalized) the way you have it in the >> dataset. I >> > don't know if it works the same here but in Postgres if you have a >> > mixed case name it sometimes needs to be enclosed in quotes >> in the select statement. >> > >> > HTH, >> > Larry >> > >> > >> >> -----Original Message----- >> >> From: [email protected] >> >> [mailto:[email protected]] On Behalf Of tim awa >> >> Sent: Tuesday, July 14, 2009 9:15 PM >> >> To: Dabo Users list >> >> Subject: Re: [dabo-users] Joins on datasets >> >> >> >> I revisited the issue noticing that I had the typo "PhoneDS" >> >> on my original post. Following is the code that i tested: >> >> >> >> """" >> >> nameDS = self.PrimaryBizobj.getDataSet() phoneDS = >> >> self.getBizobj(dataSource="public.tblphone").getDataSet() >> >> >> >> nameDS.execute("select * from dataset") phoneDS.execute("select * >> >> from dataset") >> >> >> >> aliasDict = { "curPhone" : phoneDS } >> >> ds = nameDS.execute("select dataset.fullname, curPhone.phone from >> >> dataset join curPhone on dataset.pk=curPhone.fkName", >> >> aliasDict) """" >> >> >> >> I tried again with the above code but still no joy. >> >> >> >> >> >> >> >> On Wed, Jul 15, 2009 at 8:23 AM, tim awa<[email protected]> wrote: >> >> > My eyes are fooling me. I am aware of the case-sensitiveness of >> >> > Python. But for some reasons, I was not able to detect it. LOL. >> >> > >> >> > >> >> > On Wed, Jul 15, 2009 at 6:48 AM, Ed Leafe<[email protected]> wrote: >> >> >> On Jul 14, 2009, at 5:41 PM, tim awa wrote: >> >> >> >> >> >>> I can't spot any difference in the two lines of code that >> >> you posted. >> >> >> >> >> >> PhoneDS != phoneDS >> >> >> >> >> >> Case sensitivity sucks, but that's the way Python >> >> works. Your >> >> >> code mixes the capitalized and lower-case versions. >> >> >> >> >> >> >> >> >> -- Ed Leafe >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
