Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seek a Table With Upper and Lower Case 2

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
My table has a mixture of Upper and Lower case values in my SearchField.

Example:

SearchField contains:
Albert
Alvaro
ALBINA
alice

I want to enter: "alvar"

and have the program locate the record containing: Alvaro

I tried setting Near On, but I wind up getting "Albert" back instead of "Alvaro" even if I enter "alvaro". I need to be able to have the search NOT be case sensitive.

I have tried adding UPPER() and or LOWER() to my Search Text fields and command line, but it was no help.

Is this as good as it gets?
 
I suggest you make an index based on UPPER(MyField) and SEEK the required field on UPPER(MySearch) with set near on. This shall yield you the result. Remember to set order to the index created.
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Hi Leonelsanchezjr,

Try to set a index like this

inde on uppe(yourSearchField) tag yourTag

when U perform the seek:

set orde to yourTag
indexseek(cSeekValue,.f.)

refer to MSDE docs for indexseek sintax.

This should work ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top