Unix Technical Forum

Is this kind of query possible? :-)

This is a discussion on Is this kind of query possible? :-) within the MySQL forums, part of the Database Server Software category; --> Hi, I have this huge database of millions of records ... mixed in are dozens and dozens, maybe hundreds ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:29 AM
182719@rock.com
 
Posts: n/a
Default Is this kind of query possible? :-)

Hi, I have this huge database of millions of records ... mixed in are
dozens and dozens, maybe hundreds of entries that are in all or mostly
uppercase. I do not want to lowercase them, or delete them.... just
ID them so they can be normalized. Is there any method to search
across a table for instances where more than 1 consecutive letter is
simply uppercase?

like

THE dog jumped over
THe dog jumped over
The DOg jumped over

..... all would be noticed .... can this be done or is this beyond the
capability of a query search?

Best regards

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:29 AM
Rik Wasmus
 
Posts: n/a
Default Re: Is this kind of query possible? :-)

On Sat, 27 Oct 2007 21:48:27 +0200, <182719@rock.com> wrote:

> Hi, I have this huge database of millions of records ... mixed in are
> dozens and dozens, maybe hundreds of entries that are in all or mostly
> uppercase. I do not want to lowercase them, or delete them.... just
> ID them so they can be normalized. Is there any method to search
> across a table for instances where more than 1 consecutive letter is
> simply uppercase?
>
> like
>
> THE dog jumped over
> THe dog jumped over
> The DOg jumped over
>
> .... all would be noticed .... can this be done or is this beyond the
> capability of a query search?


SELECT fieldname
FROM test
WHERE fieldname REGEXP BINARY '[[:upper:]]{2,}';
--
Rik Wasmus
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:51 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com