Matching fields between 3 tables

T

tanskm

I am trying to join 3 tables in a query where the Unique ID consists of
capital letters and small letters. A combination of capital letters, small
letters and numbers form the ID.

Understand MS Access had an issue not being able to differentiate capital
and small letters. How can i get round this problem?
 
M

Michel Walsh

Jet is, indeed, only case insensitive (and MS SQL Server is case insensitive
by default... else, tables names are also be case sensitive, since they are
data too, in system tables).

To differentiate between two strings which may differ only by the case, you
can use StrComp which returns -1, 0 or +1 if the second string is
lexicographically before, equal or after the first string.

? StrComp( "A", "a", vbBinaryCompare), StrComp("a", "a", vbBinaryCompare)
-1 0


so, basically, in a query, use:

0=StrComp( firstField, secondField, 0)


( ie, don't forget to compare the result to 0 )




Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top