Re: Select statement returning to many answers

2004-05-24 Thread Neculai Macarie
Hello, I am running MySQL5.0.0 on my OpenBSD system. When I excute this query I get 153 hits. SELECT b.batch_id, b.date, b.creator, b.comments FROM cd_batch as b; But when I add this table to the where clause i get 5831 hits SELECT b.batch_id, b.date, b.creator, b.comments FROM

Re: Select statement returning to many answers

2004-05-24 Thread Victoria Reznichenko
Jonas Lind?n [EMAIL PROTECTED] wrote: Hello, I am running MySQL5.0.0 on my OpenBSD system. When I excute this query I get 153 hits. SELECT b.batch_id, b.date, b.creator, b.comments FROM cd_batch as b; But when I add this table to the where clause i get 5831 hits SELECT b.batch_id,

RE: Select statement returning to many answers

2004-05-24 Thread Jan Goyvaerts \(jgoyvaer\)
Hello Jonas, Looking to the second query I think you're having a cartesian product. For each row in one table you get all the rows from the other table. (And that's usually not the intended result.) This is because there is no join between the tables. I think that adding a where clause to your

Re: Select statement returning to many answers

2004-05-24 Thread Jonas Lindén
Subject: Re: Select statement returning to many answers Jonas Lind?n [EMAIL PROTECTED] wrote: Hello, I am running MySQL5.0.0 on my OpenBSD system. When I excute this query I get 153 hits. SELECT b.batch_id, b.date, b.creator, b.comments FROM cd_batch as b; But when I add this table