Solved

Paradox case-sensitive

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 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