update query and case sensitive

  • Thread starter Thread starter jfriel
  • Start date Start date
J

jfriel

Is there a way to perform an update query that is case
sensitive? I am trying to run an update query on a field
that contains the same text but in a different case, (eg.
lower case and upper case), with each case having a
seperate primary key.
 
jfriel said:
Is there a way to perform an update query that is case
sensitive? I am trying to run an update query on a field
that contains the same text but in a different case, (eg.
lower case and upper case), with each case having a
seperate primary key.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How can each case have a separate PK? If there is something in the PK
that indicates Ucase or Lcase then you could use that in a criteria;
otherwise, you'll have to use the Instr() function w/ binary comparison:

WHERE InStr(1, column_name, string, 0) > 0

On large tables this will be slow 'cuz the entire table will be scanned
to evaluate the function InStr(). That's why I asked if there is some
flag in the PK that indicates Ucase or Lcase.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlW1B4echKqOuFEgEQKjfgCfS2i+YrEDwVpKaaH4WvGWdkV+j9sAn35a
z+U8qgE7uM89wVa9aE+Yle9a
=1aux
-----END PGP SIGNATURE-----
 
-----Original Message-----


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How can each case have a separate PK? If there is something in the PK
that indicates Ucase or Lcase then you could use that in a criteria;
otherwise, you'll have to use the Instr() function w/ binary comparison:

WHERE InStr(1, column_name, string, 0) > 0

On large tables this will be slow 'cuz the entire table will be scanned
to evaluate the function InStr(). That's why I asked if there is some
flag in the PK that indicates Ucase or Lcase.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlW1B4echKqOuFEgEQKjfgCfS2i+YrEDwVpKaaH4WvGWdkV+j9 sAn35a
z+U8qgE7uM89wVa9aE+Yle9a
=1aux
-----END PGP SIGNATURE-----
.
I'm running a word macro that looks in a document for
certain text. When it finds the text it adds it to the
database. the database has a table called Cnames with 2
fields. the pk field and a componentName field eg.
pk = r004
componentname = Engine Control Module
pk = r005
componentname = Engine control module
If i find the name Engine control module in the word doc
and add it to a seperate table and try to update by
joining the componentname field to the field in the other
table it doesn't always give me the pk for the sentence
case
 
Back
Top