Re: [sqlite] Newbie what does & do.

2009-03-28 Thread Dermot
2009/3/28 Jay A. Kreibich <j...@kreibi.ch>: > On Fri, Mar 27, 2009 at 05:37:49PM +0000, Dermot scratched on the wall: > >> The statement is: >> >> SELECT COUNT(*) FROM products WHERE productid=808800033 AND >> (allowcountry2 & 0x0001) >>

[sqlite] Newbie what does & do.

2009-03-27 Thread Dermot
Hi, I just bough my "Introduction to SQL 4th edition" as per a list member's advice. Before I had a chance to take it home and start going through it I came across an SQL statement that I could use some help understanding. The statement is: SELECT COUNT(*) FROM products WHERE

[sqlite] Newbie: Further reading / books recommendations

2009-03-18 Thread Dermot
Hi, I need get up to speed on a number of aspect of databases. I do need to grasp SQL syntax but also I also could use a more ideas on schema design and the process of modelling. I have learning MySQL. Are there books that the list might suggest? Thanx, Dp.

Re: [sqlite] Newbie question

2009-03-18 Thread Dermot
2009/3/18 Hoover, Jeffrey : > > 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 >

Re: [sqlite] Newbie question

2009-03-18 Thread Dermot
2009/3/18 Igor Tandetnik <itandet...@mvps.org>: > Dermot <paik...@googlemail.com> wrote: >> I want to do a select query a bit like this: >> >> SELECT * FROM tbl1 WHERE description="someval" AND >> foreign_key_id=(select id from tbl2 where name=

[sqlite] Newbie question

2009-03-18 Thread Dermot
Hi, I am very green with SQL entirely so I apologise in advance for what might be a simple query. I want to do a select query a bit like this: SELECT * FROM tbl1 WHERE description="someval" AND foreign_key_id=(select id from tbl2 where name="Joe"); This gives me a syntax error and my other