Solved

Paradox case-sensitive

Posted on 1998-07-16
5
332 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now