budman Posted September 6, 2006 Share Posted September 6, 2006 I need a query to return item in Hotels_name that is ALL uppercase.Here is my attempt... mysql> select hotels_name,hotels_name REGEXP '[[:upper:]]' is_upper from hotels having is_upper=1 limit 10;+------------------------------------------------------+----------+| hotels_name | is_upper |+------------------------------------------------------+----------+| Delfin Siesta Mar | 1 || Fairfield Bay Resort | 1 || Holiday Inn Express Modesto | 1 || Hotel Baronka Bratislava | 1 || Resortquest Trappeurs S Crossing | 1 || Roof at Spanish Steps Hotel | 1 || Waldhotel Eskeshof | 1 || Westbury Mayfair | 1 || YWCA Montreal | 1 || "Stirling Country House" Fine Mountain Accommodation | 1 |+------------------------------------------------------+----------+10 rows in set (0.00 sec) Link to comment https://forums.phpfreaks.com/topic/19957-need-query-to-pull-items-that-are-all-caps-fred-not-fred/ Share on other sites More sharing options...
thioz Posted September 6, 2006 Share Posted September 6, 2006 maybe a too simple solution... if there is such a thing ;) select hotels_name, from hotels WHERE UPPER(hotel_name) LIKE BINARY hotel_name;I'm sure it's not the best solution ... but works like a glove .Have phun ;) Link to comment https://forums.phpfreaks.com/topic/19957-need-query-to-pull-items-that-are-all-caps-fred-not-fred/#findComment-87444 Share on other sites More sharing options...
budman Posted September 6, 2006 Author Share Posted September 6, 2006 THANKS!!! YOU ROCK!!!Still, the simplest things in life are usually the hardest to see.... Link to comment https://forums.phpfreaks.com/topic/19957-need-query-to-pull-items-that-are-all-caps-fred-not-fred/#findComment-87474 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.