Re: Weird query behaviour

2004-12-01 Thread Stuart Felenstein
--- Roger Baklund <[EMAIL PROTECTED]> wrote: > The WHERE clause describes EACH of the rows you get > in the result. No > one row can have a value in the School column equal > to "Columbia" AND > "Stamford" at the same time. You should use OR > instead of AND. > Thank you Roger. That is one of

Re: Weird query behaviour

2004-12-01 Thread Stuart Felenstein
--- [EMAIL PROTECTED] wrote: > There is nothing weird about that behavior. You > asked for all of the rows > where the School column has both of two different > values at the same time. I thought joins were difficult to comprehend ;) > Try an OR instead or use the IN() operator. > > WHERE Sc

Re: Weird query behaviour

2004-12-01 Thread SGreen
There is nothing weird about that behavior. You asked for all of the rows where the School column has both of two different values at the same time. >> WHERE School='Columbia' and School='Stamford' if School is 'Columbia' the first part is true but the second part can't be and vice versa. Your

Re: Weird query behaviour

2004-12-01 Thread Roger Baklund
Stuart Felenstein wrote: [...] But if in the where statment I add: where School = Columbia and School = Stamford Nothing is returned The WHERE clause describes EACH of the rows you get in the result. No one row can have a value in the School column equal to "Columbia" AND "Stamford" at the same

Weird query behaviour

2004-12-01 Thread Stuart Felenstein
or maybe it's me :) Anyway here is my table ++--+ | RecordID | School | | PID,AI,INT | Varchar| ++--+ | 108 | Columbia | +|--+ | 108 | Princeton | +|--+ | 108