Hi,
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.
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
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
wh
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" VA
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
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
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 Jo
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 planning stage.
> Is there an
d=?; 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] R
rks
> 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
>
> Thanks a lot Hick
;> -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
>>
>> Thanks a lot
the appropriate
> > >
> > > SELECT <...t1 fields> FROM t1 where t1.rowid=?; SELECT <...t2 fields>
> > > FROM t2 where t2.rowid=?; SELECT <...t3 fields> FROM t3 where
> > > t3.rowid=?;
> > >
> > >
> > >
> > > --
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 would
himself.
-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
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 rows , but I would like to p
14 matches
Mail list logo