RE: Problems with simple(?) query

2002-11-18 Thread Arthur Fuller
ECT * FROM foo WHERE id1=1 AND id2=2 Both these queries could return rows. hth, Arthur -Original Message- From: John Ragan [mailto:[EMAIL PROTECTED]] Sent: Monday, November 11, 2002 9:38 PM To: [EMAIL PROTECTED] Subject: Re: Problems with simple(?) query > Hi, > > I'm try

Re: Problems with simple(?) query

2002-11-11 Thread John Ragan
> Hi, > > I'm trying to write what I am sure should be a simple query, but just can't get it >to > work! > > If I create a table called foo like this: > create table foo ( id1 int(11) , id2(int 11) ); > > populate it with data and then try: > > SELECT * FROM foo WHERE id2=1 AND id2=2 (for exa

Re: Problems with simple(?) query

2002-11-11 Thread Michael T. Babcock
Keith C. Ivey wrote: On 11 Nov 2002, at 20:03, James Dyer wrote: SELECT * FROM foo WHERE id2=1 AND id2=2 (for example), I just get an empty set returned. An explain on the query gives an 'Impossible WHERE' message. Because it's impossible for id2 to be both 1 and 2. What were you expec

Re: Problems with simple(?) query

2002-11-11 Thread Keith C. Ivey
On 11 Nov 2002, at 20:03, James Dyer wrote: > SELECT * FROM foo WHERE id2=1 AND id2=2 (for example), > > I just get an empty set returned. An explain on the query gives an 'Impossible WHERE' > message. Because it's impossible for id2 to be both 1 and 2. What were you expecting? Did you mean "

RE: Problems with simple(?) query

2002-11-11 Thread Grigor, Peter
In your query ID2 cannot be both 1 and 2 (typomundo) Peter <^_^> -Original Message- From: James Dyer [mailto:jad@;disparate.org] Sent: Monday, November 11, 2002 3:04 PM To: [EMAIL PROTECTED] Subject: Problems with simple(?) query Hi, I'm trying to write what I am sure

Re: Problems with simple(?) query

2002-11-11 Thread Dan Nelson
In the last episode (Nov 11), James Dyer said: > If I create a table called foo like this: > create table foo ( id1 int(11) , id2(int 11) ); > > populate it with data and then try: > > SELECT * FROM foo WHERE id2=1 AND id2=2 (for example), > > I just get an empty set returned. An explain on the

Problems with simple(?) query

2002-11-11 Thread James Dyer
Hi, I'm trying to write what I am sure should be a simple query, but just can't get it to work! If I create a table called foo like this: create table foo ( id1 int(11) , id2(int 11) ); populate it with data and then try: SELECT * FROM foo WHERE id2=1 AND id2=2 (for example), I just get an em