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 > > ...> WHERE ZGroupItem.groupId = 1; > > SQL error: near ".": syntax error > > > > How to solve it? > > Well, for starters you need to add a comma between the 2 items you have > between > SELECT and FROM. Simple syntax error. > > SELECT ZGroupItem.ZPhDevId, HomeDev.text > FROM ZGroupItem > INNER JOIN ZPhDev ON ZGroupItem.ZPhDevId = ZPhDev.id > WHERE ZGroupItem.groupId = 1; > > -- Darren Duncan
Thanks, Darren Duncan, but this simple syntax error is by hand, in fact, you haven't found table HomeDev haven't been included whereby I must get HomeDev.text. Any way, thank you,all the same. And this question I have solved:) Best Regards Kermit Mei _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users