Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread James K. Lowden
On Wed, 24 Sep 2014 11:03:53 +0530 Prakash Premkumar wrote: > Let's say an output of the join is: > > r11,r21,r31 > r11,r21,r32 > r11,r21,r33 > > where r1i is the i th row in T1, r2i is the i th row in T2 and r3i is > the ith row in T3: > > sqlite produces 3 result

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread dave
lf. -dave > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Keith Medcalf > Sent: Wednesday, September 24, 2014 8:27 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Results of Joins in sqlit

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread RSmith
On 2014/09/24 15:06, Prakash Premkumar wrote: Thanks a lot , Simon and Hick, What I am looking for is , instead of iterating through the result which sqlite provides and then form the respective objects and setting pointers, is it possible to hack sqlite to fill in the objects this way. I

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread John Hascall
com] > > Gesendet: Mittwoch, 24. September 2014 12:54 > > An: General Discussion of SQLite Database > > Betreff: Re: [sqlite] Results of Joins in sqlite > > > > Thanks a lot Hick,for your approach. > > With the approach you suggested, we are creating extra querie

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Keith Medcalf
gt; first? >> >> -Ursprüngliche Nachricht- >> Von: Prakash Premkumar [mailto:prakash.p...@gmail.com] >> Gesendet: Mittwoch, 24. September 2014 12:54 >> An: General Discussion of SQLite Database >> Betreff: Re: [sqlite] Results of Joins in sqlite >&

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Prakash Premkumar
QLite Api as intended and works > first? > > -Ursprüngliche Nachricht- > Von: Prakash Premkumar [mailto:prakash.p...@gmail.com] > Gesendet: Mittwoch, 24. September 2014 12:54 > An: General Discussion of SQLite Database > Betreff: Re: [sqlite] Results of Joins in sqlite > >

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Hick Gunter
How about writing something that uses the SQLite Api as intended and works first? -Ursprüngliche Nachricht- Von: Prakash Premkumar [mailto:prakash.p...@gmail.com] Gesendet: Mittwoch, 24. September 2014 12:54 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Results of Joins

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Simon Slavin
On 24 Sep 2014, at 11:53am, Prakash Premkumar wrote: > Thanks a lot Hick,for your approach. > With the approach you suggested, we are creating extra queries and if the > join is on n tables there will be n+1 queries , and each query will have to > go through a query

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Prakash Premkumar
t2 where t2.rowid=?; > SELECT <...t3 fields> FROM t3 where t3.rowid=?; > > > > -Ursprüngliche Nachricht- > Von: Prakash Premkumar [mailto:prakash.p...@gmail.com] > Gesendet: Mittwoch, 24. September 2014 09:32 > An: General Discussion of SQLite Database > Betreff:

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Hick Gunter
m] Gesendet: Mittwoch, 24. September 2014 09:32 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Results of Joins in sqlite Thanks for the reply Clemens. Yes.I'm sorry. It will not have 8 columns. When one result row comes in , I want to create an object for each table (My app

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Prakash Premkumar
Thanks for the reply Clemens. Yes.I'm sorry. It will not have 8 columns. When one result row comes in , I want to create an object for each table (My application map one struct to one table) and put the columns of respective tables in their individual structs. i,e I would set column 0 and column

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Clemens Ladisch
Prakash Premkumar wrote: > Let's say I have tables T1,T2 and T3 with 2 columns each and I am joining > them. > The result rows will have 8 columns each. No. The result will have between 4 and 6 columns, depending on how you do the joins. Example: CREATE TABLE T1(ID1, Name); INSERT INTO "T1"

Re: [sqlite] Results of Joins in sqlite

2014-09-24 Thread Prakash Premkumar
To further clarify, the result of a join forms a row that has a new schema . (the new schema is derived from the schemas of the tables participating in the joins.) I would like to retain the old schema in the join result as well, so there is a split between which column belongs / is coming from