List:General Discussion« Previous MessageNext Message »
From:mem bob Date:October 24 2005 1:45pm
Subject:Selecting more than one property (req help)
View as plain text  
Hi all,

Can anyone throw some suggestions at me for this problem?

| id | model | service_id |
|----|-------|------------|
| 1 | 500 | 1 |
| 2 | 500 | 3 |
| 3 | 500 | 10 |
| 4 | 600 | 1 |


From this table i want to extract all distinct models which have
service_id=1 *AND* service_id=3

What's the best possible (speed) solution for this - I have a lot of records
to juggle about!

I have tried inner joining it within it's self but this method could get
rather complicated.
I have also tried making a count of service_id's captured and HAVING count
== 2 but this query seems slow.

Any suggestions or pointers would be great!

Thanks

Membob

Thread
Selecting more than one property (req help)mem bob24 Oct
  • Re: Selecting more than one property (req help)SGreen24 Oct
  • Re: Selecting more than one property (req help)Jigal van Hemert24 Oct