Solved

SQL - Find string thats last letter is capitalized and the letter directly before it is lowercase

Posted on 2008-10-15
7
972 Views
Last Modified: 2008-12-11
Hi all,

I need to find any word in my "account" field thats last letter is capitalized and the letter directly before it is lowercase

For example I need to fin "FarmerS" in "American FarmerS Association"

I've found how to find the Capital "S" however finding a lowercase number before hand is tricking me. Can someone help write a query for this?

Thanks, -RJ
0
Comment
Question by:netadmin2004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 

Author Comment

by:netadmin2004
ID: 22721663
sorry.. lowercase letter :S
0
 

Author Comment

by:netadmin2004
ID: 22723688
So is this impossible? Normally I get tons of responses on SQL queries.
0
 
LVL 29

Expert Comment

by:fibo
ID: 22728353
Consider using a regexp

SELECT id, account, field3
          FROM table
          WHERE account REGEXP '[:lower:][:UPPER:]$'
     ;
0
 

Author Comment

by:netadmin2004
ID: 22733336
cant use REGEXP in ms sql
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 22964432
what about this:
WHERE yourfield LIKE '%[a-z][A-Z]%'

Open in new window

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question