| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|how do u show a result once?|
| 8:56 am on Sep 28, 2005 (gmt 0)|
I am using the below statment to bring back results for towns beginning with A to E.
SELECT * FROM data1 where town between 'A%' and 'E%' ORDER BY town
But because I multipule entries the results are for example:
How do I get it to return just the one result per town?
Thanks for any help?
| 9:40 am on Sep 28, 2005 (gmt 0)|
SELECT distinct FROM data1 where town between 'A%' and 'E%' ORDER BY town
| 9:46 am on Sep 28, 2005 (gmt 0)|
mmm.. got an error
Warning: Supplied argument is not a valid MySQL result
Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM golf where town between 'A%' and 'E%'
| 10:05 am on Sep 28, 2005 (gmt 0)|
.. sorry try
SELECT DISTINCT 'town' FROM 'data1' where 'town' between 'A%' and 'E%' ORDER BY 'town'
forgot to put in town, but it's the "DISTINCT" that should get your one result.
| 10:35 am on Sep 28, 2005 (gmt 0)|
that's got it thanks for your help
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved