PC Review


Reply
Thread Tools Rate Thread

Comparing text fields to find upper case lower case mismatches

 
 
RAN
Guest
Posts: n/a
 
      3rd Dec 2008
I have to compare a text field in one table to a corresponding text field in
a master table. I need to identify where the case of each letter doesn't
match the case of each letter in the master table. I've tried using the
StrComp function in a query but I'm not getting the expected results. Can
anyone help? For example,
StrComp(Stainless Steel, stainless steel) gives a value of 1, but
StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
Thanks in advance for your help.
 
Reply With Quote
 
 
 
 
Beetle
Guest
Posts: n/a
 
      3rd Dec 2008
Untested, but try using a criteria like;

Where StrComp([Field1], [Field2], 0)<>0

--
_________

Sean Bailey


"RAN" wrote:

> I have to compare a text field in one table to a corresponding text field in
> a master table. I need to identify where the case of each letter doesn't
> match the case of each letter in the master table. I've tried using the
> StrComp function in a query but I'm not getting the expected results. Can
> anyone help? For example,
> StrComp(Stainless Steel, stainless steel) gives a value of 1, but
> StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
> Thanks in advance for your help.

 
Reply With Quote
 
RAN
Guest
Posts: n/a
 
      4th Dec 2008
The query is still getting all records where there is a match. Should this
not be done in a query? "Where" & "StrComp()" in the field definition or in
the criteria gives a invalid syntax error, so I dropped the "Where" in the
Field Definition and put the <>0 in the Criteria.
StrComp(Stainless Steel, Stainless Steel, 0) = 1

"Beetle" wrote:

> Untested, but try using a criteria like;
>
> Where StrComp([Field1], [Field2], 0)<>0
>
> --
> _________
>
> Sean Bailey
>
>
> "RAN" wrote:
>
> > I have to compare a text field in one table to a corresponding text field in
> > a master table. I need to identify where the case of each letter doesn't
> > match the case of each letter in the master table. I've tried using the
> > StrComp function in a query but I'm not getting the expected results. Can
> > anyone help? For example,
> > StrComp(Stainless Steel, stainless steel) gives a value of 1, but
> > StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
> > Thanks in advance for your help.

 
Reply With Quote
 
RAN
Guest
Posts: n/a
 
      4th Dec 2008
Thanks for your help. One of the fields has blank spaces after the text, so I
used the Trim() function to remove all blanks around the text and StrComp()
works like a charm. Thanks again.

"Beetle" wrote:

> Untested, but try using a criteria like;
>
> Where StrComp([Field1], [Field2], 0)<>0
>
> --
> _________
>
> Sean Bailey
>
>
> "RAN" wrote:
>
> > I have to compare a text field in one table to a corresponding text field in
> > a master table. I need to identify where the case of each letter doesn't
> > match the case of each letter in the master table. I've tried using the
> > StrComp function in a query but I'm not getting the expected results. Can
> > anyone help? For example,
> > StrComp(Stainless Steel, stainless steel) gives a value of 1, but
> > StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
> > Thanks in advance for your help.

 
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
Shourtcut to change text written in upper case to lower case becksm Microsoft Word Document Management 4 26th Jan 2010 03:18 PM
Find Text (Lower or Upper Case) mralmackay@aol.com Microsoft Excel Misc 4 11th Aug 2008 11:42 AM
Can't find short cut for changing case ... upper case .... lower case JERRY Microsoft Word New Users 7 23rd Aug 2007 05:29 PM
convert upper case text to lower case with the first letter upper =?Utf-8?B?Skg=?= Microsoft Access Macros 1 20th Aug 2006 09:07 PM
comparing upper case with lower case Leslie Isaacs Microsoft Access Queries 4 8th Mar 2006 01:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:15 AM.