![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Please can somebody help me with this though query I have 2 fields in my table: owner and machine none of them are unique I want to do a query - as input I have a list of owners as output I need the machines, but only one jack radio jack computer jack cdplayer bill radio bill shoes larry shoes larry trouser larry gps kate cdplayer kate car as input I give 'jack AND bill AND larry' as output I need 'radio computer cdplayer shoes trouser gps' Can anybody help me? | |||
| Advertisements |
| | #2 | ||
| Jaak ha scritto: > Please can somebody help me with this though query > > I have 2 fields in my table: owner and machine > none of them are unique > > I want to do a query - as input I have a list of owners > as output I need the machines, but only one > > jack radio > jack computer > jack cdplayer > bill radio > bill shoes > larry shoes > larry trouser > larry gps > kate cdplayer > kate car > > as input I give 'jack AND bill AND larry' > as output I need 'radio computer cdplayer shoes trouser gps' > > Can anybody help me? > > > > Hallo Jaak, you can try using select distinct this way: select distinct(machine) from table1 where name='larry' or name='bill' or name='larry'; Bye Enrico | |||
| | #3 | ||
| "EmC" <enricomFASULLA@tiscali.it> schreef in bericht news:43c2c744$0$346$5fc30a8@news.tiscali.it... > Jaak ha scritto: >> Please can somebody help me with this though query >> >> I have 2 fields in my table: owner and machine >> none of them are unique >> >> I want to do a query - as input I have a list of owners >> as output I need the machines, but only one >> >> jack radio >> jack computer >> jack cdplayer >> bill radio >> bill shoes >> larry shoes >> larry trouser >> larry gps >> kate cdplayer >> kate car >> >> as input I give 'jack AND bill AND larry' >> as output I need 'radio computer cdplayer shoes trouser gps' >> >> Can anybody help me? >> >> >> >> > Hallo Jaak, > you can try using select distinct this way: > select distinct(machine) from table1 where name='larry' or name='bill' Dear Enrico, Thank you very much! Distinct was indeed the thing where I was looking for! Thanks Jaak | |||
| Featured Websites | ||||
|
![]() |
| Tags: query, question |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with query | Alex Stuy | Database | 4 | 05-31-2007 8:45 PM |
| What is wrong with this query? | Wendell Jones | Database | 0 | 05-31-2007 8:37 PM |
| Query on Shilling | Bluehaven201 | Ebay Technical Questions | 19 | 05-30-2007 2:18 AM |
| Query on Shilling | Richard Ward | Ebay Technical Questions | 2 | 05-30-2007 2:16 AM |
| another Paypal query | SuperLeeds | Ebay Technical Questions | 9 | 05-30-2007 1:40 AM |
| Featured Websites | ||||
|