Re: [sqlite] how to join 3 tables from a sqlite database?

2014-03-25 Thread Keith Medcalf
>On 25 March 2014 14:09, Christian Dallinger > wrote: >> Hello, I want to join these 3 tables from my database: >> >> http://pastebin.com/f8FP0G0C > >something like > >select Macadress, timestamp, result, user, '', '', '', '' from checklog >union >select

Re: [sqlite] how to join 3 tables from a sqlite database?

2014-03-25 Thread Simon Davies
On 25 March 2014 14:09, Christian Dallinger wrote: > Hello, I want to join these 3 tables from my database: > > http://pastebin.com/f8FP0G0C something like select Macadress, timestamp, result, user, '', '', '', '' from checklog union select MacAdress, timestamp,

[sqlite] how to join 3 tables from a sqlite database?

2014-03-25 Thread Christian Dallinger
Hello, I want to join these 3 tables from my database: http://pastebin.com/f8FP0G0C ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to JOIN...

2012-02-22 Thread Danilo Cicerone
Thanks, your solution works better in case a student has subscribed a course and has no card. Just add the following SQL statement to the FILE: INSERT INTO A VALUES(3,'Jack','Bridge'); INSERT INTO A2B VALUES(5,3,3); to prove it. 2012/2/22 Igor Tandetnik : > On 2/22/2012

Re: [sqlite] How to JOIN...

2012-02-22 Thread Danilo Cicerone
Thanks! Sigh, I need more research on JOINs I need more research on JOINs, I need more research on JOINs, I need more research on JOINs, I need more research on JOINs, I need more research on JOINs, I need more research on JOINs, I need more research on JOINs, I need more research on JOINs.

Re: [sqlite] How to JOIN...

2012-02-22 Thread Igor Tandetnik
On 2/22/2012 1:05 PM, Danilo Cicerone wrote: two views. According to the following SQL statement(see below) I'm going to create a table 'A' storing student's name, table 'B' storing courses and table D storing cards. Furthermore, it creates two pivot tables A2B and A2D to refer courses and

Re: [sqlite] How to JOIN...

2012-02-22 Thread Simon Davies
On 22 February 2012 18:05, Danilo Cicerone wrote: > ...two views. According to the following SQL statement(see below) I'm > going to create a table > 'A' storing student's name, table 'B' storing courses and table D storing > cards. > Furthermore, it creates two pivot tables

[sqlite] How to JOIN...

2012-02-22 Thread Danilo Cicerone
...two views. According to the following SQL statement(see below) I'm going to create a table 'A' storing student's name, table 'B' storing courses and table D storing cards. Furthermore, it creates two pivot tables A2B and A2D to refer courses and cards. I'd like to query the DB to get that

Re: [sqlite] How to join 3 tables?

2009-10-07 Thread Kermit Mei
On Tue, 2009-10-06 at 21:14 -0700, Darren Duncan wrote: > Kermit Mei wrote: > > How can I do it in only one sql command? I wrote it like this, but it > > can't run: > > sqlite> SELECT ZGroupItem.ZPhDevId HomeDev.text FROM ZGroupItem > >...> INNER JOIN ZPhDev ON ZGroupItem.ZPhDevId = ZPhDev.id

Re: [sqlite] How to join 3 tables?

2009-10-06 Thread Kermit Mei
On Wed, 2009-10-07 at 12:10 +0800, Kermit Mei wrote: > Hello, I have three tables like this: > > HomeDev(id,...,text) > ZPhDev(id,...,HomeDevId) > ZGroupItem(id,...,groupId,ZPhDevId) > > Now, I want to get the items like this: > > ZPhDev.id, and its corresponding HomeDev.text, the relation is

Re: [sqlite] How to join 3 tables?

2009-10-06 Thread Darren Duncan
Kermit Mei wrote: > How can I do it in only one sql command? I wrote it like this, but it > can't run: > sqlite> SELECT ZGroupItem.ZPhDevId HomeDev.text FROM ZGroupItem >...> INNER JOIN ZPhDev ON ZGroupItem.ZPhDevId = ZPhDev.id >...> WHERE ZGroupItem.groupId = 1; > SQL error: near ".":

[sqlite] How to join 3 tables?

2009-10-06 Thread Kermit Mei
Hello, I have three tables like this: HomeDev(id,...,text) ZPhDev(id,...,HomeDevId) ZGroupItem(id,...,groupId,ZPhDevId) Now, I want to get the items like this: ZPhDev.id, and its corresponding HomeDev.text, the relation is like this: 1. Get ZGroupItem.ZPhDevId When I know groupId 2. Get