Solved

Paradox case-sensitive

Posted on 1998-07-16
5
344 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:sergio_2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:vladika
ID: 1358055
Try to use UPPER() or LOWER() function (see help in localsql.hlp)

select * from animals where UPPER(name)='ANGEL FISH'

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358056
yep, like vladika's solution, use UPPER or LOWER. Zif.
0
 
LVL 5

Expert Comment

by:mayhew
ID: 1358057
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!   :)
0
 

Author Comment

by:sergio_2001
ID: 1358058
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..
0
 
LVL 3

Accepted Solution

by:
vladika earned 50 total points
ID: 1358059
You can use UPPER/LOWER in LIKE statement.
But you must use '%' instead of '*' and '_' instead of '?'
'%' - any character sequence
'_' - any one character

So,

'select * from table
where UPPER(field) like UPPER(''' + edit.text + '%'')'

or

'select * from table
where LOWER(field) like LOWER(''' + edit.text + '%'')'

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question