according to this http://www.sqlite.org/lang_keywords.html
both the single and double quotes should have worked. (the single quotes are preferred) On Wed, Mar 18, 2009 at 9:04 AM, Dermot <paik...@googlemail.com> wrote: > 2009/3/18 Hoover, Jeffrey <jhoo...@jcvi.org>: > > > > Assumming this is only one row in tbl2 where name='Joe'... > > > > this should work: > > SELECT * FROM tbl1 > > WHERE description='someval' > > AND foreign_key_id=(select id from tbl2 where name='Joe'); > > > > this is better: > > select tbl1.* from tbl1, tbl2 > > where tbl1.description='someval' > > AND tbl2.name='Joe' and tbl2.id=tbl1. foreign_key_id; > > > > if there may be many rows in tbl2 where name =- 'Joe' then > > SELECT * FROM tbl1 > > WHERE description='someval' > > AND foreign_key_id in (select id from tbl2 where name='Joe'); > > Both of the top 2 worked. Thank you. I'll try and stick to the less > ambiguous form and bear in mind all the comments about single quotes. > > A bit more information though. Is there a term for that type of SELECT > statement? > > Thanx, > Dp. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Jim Dodgen j...@dodgen.us _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users