Solved

Dealing with Case sensitivity in MS Access

Posted on 2013-01-08
4
271 Views
Last Modified: 2013-01-08
Good morning,

I have a series of table which I need to incorporate into a MS Access DB.  The unique key in the source tables are from a DB structure where case is also considered so, where my source data defines 12345AB and 12345Ab as unique records, MS access states these are duplicates.

Any suggestions on how to tell MS Access that these are indeed to different records?
0
Comment
Question by:MCaliebe
[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
4 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 75 total points
ID: 38755377
you can try using the strComp(s1,s2,vbBinarycompare)  function

?strcomp("12345AB","12345Ab",vbBinaryCompare)
-1
meaning string1 is less than string2
or

?strcomp("12345Ab","12345AB",vbBinaryCompare)
 1
meaning string1 is greater than string2
0
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
ID: 38755443
There is no way that I know of to store case-sensitive key values- Access is intrinsically case insensitive except where coding is used to specify case-sensitive comparisons..
To store such values I think you would need to introduce a new primary key field and use the existing key values as data.
0
 

Author Closing Comment

by:MCaliebe
ID: 38755957
Points awarded to both answers as they are both correct.  A function can be used to determine differences in a field as related to CASE, however as this item is to be used as a KEY value, MS Access won't function to differentiate based on case.
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 38756031
A function can be used to determine differences in a field as related to CASE, however as this item is to be used as a KEY value, MS Access won't function to differentiate based on case.

Depends on what type of key you mean.  If you mean as a primary key, the above is correct.

As a join key, it could work, as cap1 demonstrated:

SELECT *
FROM tbl1, tbl2
WHERE StrComp(tbl1.ID, tb2.ID, 0) = 0

Open in new window

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

630 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