sergio_2001
asked on
Paradox case-sensitive
Hi all,
When I do SQL searches using Paradox tables it returns only if I observe the case-sensitive feature.
Can I do queries without be case sensitive?
I hope to be clear
Regards
When I do SQL searches using Paradox tables it returns only if I observe the case-sensitive feature.
Can I do queries without be case sensitive?
I hope to be clear
Regards
yep, like vladika's solution, use UPPER or LOWER. Zif.
Actually, if you don't have control of the search string (eg. user input in edit box) you should use UPPER on *both* sides of the equals sign.
select * from animals where UPPER(name) = UPPER(Edit Box Text)
This is what we always do.
Also, if you are only worried about one character in your string you can use:
select * from animals where name = '[Aa]ngel [Ff]ish'
This will return rows like:
'angel Fish'
'Angel fish'
'Angel Fish'
'angel fish'
I'm not positive this will work with Paradox local SQL but it works with several other engines and might be worth a try if it fits your needs.
Hope this is helpful! :)
select * from animals where UPPER(name) = UPPER(Edit Box Text)
This is what we always do.
Also, if you are only worried about one character in your string you can use:
select * from animals where name = '[Aa]ngel [Ff]ish'
This will return rows like:
'angel Fish'
'Angel fish'
'Angel Fish'
'angel fish'
I'm not positive this will work with Paradox local SQL but it works with several other engines and might be worth a try if it fits your needs.
Hope this is helpful! :)
ASKER
Hi,
I'll test yours hints.
Note that I doing dynamic query. 'Select * From Table Where Field LIKE ' + '"'+edit.text+'*"' '.
I'm using LIKE in my clauses. Can UPPER/LOWER works together.
Regards..
I'll test yours hints.
Note that I doing dynamic query. 'Select * From Table Where Field LIKE ' + '"'+edit.text+'*"' '.
I'm using LIKE in my clauses. Can UPPER/LOWER works together.
Regards..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select * from animals where UPPER(name)='ANGEL FISH'