Solved

Paradox case-sensitive

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi: Connect to running MS Outlook 4 77
FMX and jaudiotracker playing memory stream 29 77
PHP preg_replace code convert to Delphi 14 54
Multi-layered image in FireMonkey 9 30
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

12 Experts available now in Live!

Get 1:1 Help Now