Solved

query problem

Posted on 2002-04-02
4
131 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

713 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