PC Review


Reply
Thread Tools Rate Thread

Case sensitive joins

 
 
=?Utf-8?B?bWJoQ0ZP?=
Guest
Posts: n/a
 
      6th Nov 2007
I have a table with a field containing both upper and lower case letters that
I am attempting to create a join with another table. However, because it
isn't case-sensitive it does not return the correct data. Is there something
I'm missing here or is there a work around?
 
Reply With Quote
 
 
 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      6th Nov 2007
See http://support.microsoft.com/kb/244693 .

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"mbhCFO" <(E-Mail Removed)> wrote in message
news:7ED0328A-BDBA-4119-82A8-(E-Mail Removed)...
>I have a table with a field containing both upper and lower case letters
>that
> I am attempting to create a join with another table. However, because it
> isn't case-sensitive it does not return the correct data. Is there
> something
> I'm missing here or is there a work around?



 
Reply With Quote
 
=?Utf-8?B?TGFuY2U=?=
Guest
Posts: n/a
 
      6th Nov 2007

easiest way is to use the strcomp function. Something like:

SELECT Table1.ID, Table1.Description
FROM Table1 INNER JOIN Table2 ON StrComp(Table1.ID, Table2.ID, 0) = 0


"mbhCFO" wrote:

> I have a table with a field containing both upper and lower case letters that
> I am attempting to create a join with another table. However, because it
> isn't case-sensitive it does not return the correct data. Is there something
> I'm missing here or is there a work around?

 
Reply With Quote
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      6th Nov 2007
Access isn't case sensitive. If this was Oracle, you'd have the opposite
problem where Jerry does not equal JERRY in queries.

If, big IF, the first character of the string makes all the difference, you
could use the ASC function to see if the first character is the same in both
fields. Something like below will exclude a joing between jerry and Jerry.
However it wouldn't catch Jerry and JERRY as the ASC function only evaluates
the first character in the string.

SELECT Admin.Name, AdminCase.Name
FROM Admin INNER JOIN AdminCase ON Admin.Name = AdminCase.Name
WHERE Asc([Admin].[Name])=Asc([AdminCase].[Name]) ;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"mbhCFO" wrote:

> I have a table with a field containing both upper and lower case letters that
> I am attempting to create a join with another table. However, because it
> isn't case-sensitive it does not return the correct data. Is there something
> I'm missing here or is there a work around?

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      6th Nov 2007
On Tue, 6 Nov 2007 08:59:04 -0800, mbhCFO <(E-Mail Removed)>
wrote:

>I have a table with a field containing both upper and lower case letters that
>I am attempting to create a join with another table. However, because it
>isn't case-sensitive it does not return the correct data. Is there something
>I'm missing here or is there a work around?


What version of Access? JET (.mdb or .accdb) database, or are the tables
linked from some other software such as SQL/Server?

It's rather difficult to force JET to be case sensitive - in fact I don't know
of a way to do so other than to put the data into SQL or MySQL or another
backend which supports case-sensitive joins, or adding an auxiliary field
containing the hexadecimal expansion of the field's value.

John W. Vinson [MVP]
 
Reply With Quote
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      6th Nov 2007
Sylvain Lafontaine's and Lance's replies are much more helpful than mine.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"Jerry Whittle" wrote:

> Access isn't case sensitive. If this was Oracle, you'd have the opposite
> problem where Jerry does not equal JERRY in queries.
>
> If, big IF, the first character of the string makes all the difference, you
> could use the ASC function to see if the first character is the same in both
> fields. Something like below will exclude a joing between jerry and Jerry.
> However it wouldn't catch Jerry and JERRY as the ASC function only evaluates
> the first character in the string.
>
> SELECT Admin.Name, AdminCase.Name
> FROM Admin INNER JOIN AdminCase ON Admin.Name = AdminCase.Name
> WHERE Asc([Admin].[Name])=Asc([AdminCase].[Name]) ;
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "mbhCFO" wrote:
>
> > I have a table with a field containing both upper and lower case letters that
> > I am attempting to create a join with another table. However, because it
> > isn't case-sensitive it does not return the correct data. Is there something
> > I'm missing here or is there a work around?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif function: how to distinguish case/make case sensitive mvwoolner Microsoft Excel Worksheet Functions 3 18th Mar 2009 02:18 PM
case sensitive Mika Pitkänen Microsoft Access 4 19th Apr 2004 09:46 PM
How to deal with case-sensitive joins DOYLE60 Microsoft Access VBA Modules 1 5th Dec 2003 11:33 AM
Re: How to deal with case-sensitive joins DOYLE60 Microsoft Access VBA Modules 0 4th Dec 2003 10:12 PM
Case Sensitive Joins in Access TopDog Microsoft Access 2 15th Sep 2003 01:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 AM.