Solved

Paradox case-sensitive

Posted on 1998-07-16
5
325 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
Comment Utility
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
Comment Utility
yep, like vladika's solution, use UPPER or LOWER. Zif.
0
 
LVL 5

Expert Comment

by:mayhew
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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