RE: SELECT WHERE IN help

2010-09-21 Thread Jerry Schwartz
>-Original Message- >From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] >Sent: Tuesday, September 21, 2010 11:48 AM >To: Johan De Meersman >Cc: [MySQL] >Subject: Re: SELECT WHERE IN help > >Thanks for the reply. The search of (3,4,5,6,7,3) is pulling data

Re: SELECT WHERE IN help

2010-09-21 Thread Joerg Bruehe
Hi Neil, all! Tompkins Neil wrote: > Hi > > With a SELECT * FROM my_table WHERE record_id IN (3,4,5,6,7,3), how can I > return two records for the record_id 3 ? Is it possible ? This is a case where you may safely use natural language and logic. The command is SELECT all fields FROM the rec

Re: SELECT WHERE IN help

2010-09-21 Thread Mark Goodge
On 21/09/2010 16:44, Tompkins Neil wrote: Thanks for the quick reply. Basically in (3,4,5,6,7,3) the record_id of 3 only exists once in the table my_table. However, because 3 exists twice within (3,4,5,6,7,3), I want it to return two records for record_id 3. Is it possible ? No, that isn't

Re: SELECT WHERE IN help

2010-09-21 Thread Tompkins Neil
Thanks for the reply. The search of (3,4,5,6,7,3) is pulling data from a table. I think in this case I need to change my design . On Tue, Sep 21, 2010 at 4:46 PM, Johan De Meersman wrote: > I don't think that'll work, no. Why would you want to return duplicate data > ? The whole point of an R

Re: SELECT WHERE IN help

2010-09-21 Thread Johan De Meersman
I don't think that'll work, no. Why would you want to return duplicate data ? The whole point of an RDBMS is to *avoid* duplicate data :-) On Tue, Sep 21, 2010 at 5:44 PM, Tompkins Neil wrote: > Thanks for the quick reply. Basically in (3,4,5,6,7,3) the record_id of 3 > only exists once in the

Re: SELECT WHERE IN help

2010-09-21 Thread Tompkins Neil
Thanks for the quick reply. Basically in (3,4,5,6,7,3) the record_id of 3 only exists once in the table my_table. However, because 3 exists twice within (3,4,5,6,7,3), I want it to return two records for record_id 3. Is it possible ? Cheers Neil On Tue, Sep 21, 2010 at 4:40 PM, Johan De Meers

Re: SELECT WHERE IN help

2010-09-21 Thread Johan De Meersman
If there are two, you will return two. On Tue, Sep 21, 2010 at 5:33 PM, Tompkins Neil wrote: > Hi > > With a SELECT * FROM my_table WHERE record_id IN (3,4,5,6,7,3), how can I > return two records for the record_id 3 ? Is it possible ? > > Cheers > Neil > -- Bier met grenadyn Is als mosterd