Solved

query problem

Posted on 2002-04-02
4
128 Views
Last Modified: 2010-04-04
Using Query in Ttable
how can i get ALL records having:

*Partial Match at the beginning
*Exact Match
*Partial Match anywhere

and

*case sensitive or not case sensitive.

Example.
how can i get all records with using

(thefield >= 'Ant%') and (thefield <= 'Cat%')

when should i use "Like" and the logical operators like
"=",">=","<>"....?
0
Comment
Question by:girlswants_me
  • 2
4 Comments
 

Expert Comment

by:FTL001
ID: 6915200
use the % delimiter.  Example select * from users where lastname like '%mit%' would return smith,mithos,smithers.  Remove either the first or trailing % sign to eliminate partial matches in front of or behind.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6915258
? is this the answer

to girlswants me

like use with a single compare like
afield like 'abc%'

instead of >=,<= for a range use
afield between 'a%' and 'b%'

for caseinsensitive use
upper(afield) like upper('abc%')

upper (or similar function)
must be supported by your database

meikl ;-)
0
 

Author Comment

by:girlswants_me
ID: 6916774
no codes
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6925028
what codes?
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

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 169
Making delphi communicate with a c# service 16 88
Base1 Encode/Decode 3 67
Delphi...Split view - idea? 1 41
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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

919 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

22 Experts available now in Live!

Get 1:1 Help Now