Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS Access 2010 search case senstive values within two columns

Posted on 2013-02-07
4
Medium Priority
?
417 Views
Last Modified: 2013-02-10
My problem is that I have two columns, both with alphanumeric values. This two clumns have the same data but in different cases.

One Column may a field with Uppercase alphabets within the field say "12345DF2313tjm" this is compared to the other column's  value  "12345df2313tjm".

I have over 10,000 rows with similar case mismatch. How can I make access compare the two columns, then if there is a case mismatch, put a new value on a new column all in upper case. In this case the new coulmn would have "12345DF2313TJM"
0
Comment
Question by:lynmke
[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
  • 2
4 Comments
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 1332 total points
ID: 38863854
An easy way to do this - but not necessarily the most efficient is to simply uppercase your column:


UPDATE YourTable
SET YourField = UCase(YourField)

Open in new window

0
 
LVL 61

Accepted Solution

by:
mbizup earned 1332 total points
ID: 38863859
Or if you are using a separate field:


UPDATE YourTable
SET YourNewField = UCase(YourOldField)

Open in new window


From your description, you don't really need a comparison, and uppercasing either field will give you your expected results.
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 668 total points
ID: 38863885
You can use the Asc() function or the StrComp() function to have Microsoft Access differentiate between case-sensitive text strings.
see this link

How to Return Case-Sensitive Matches in Queries

http://support.microsoft.com/kb/209674

you can run a query like this

update tableName
set [newcolumn]=ucase([Column1])
where strcomp([column1],[column2],0) <>0
0
 

Author Closing Comment

by:lynmke
ID: 38873588
Thanks, all solutions accepted.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

721 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