Solved

query problem

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Form ownership 4 90
Downloading email attachments 2 74
drawing animated level bar based on numbers 3 97
Dynamically Created Query 3 55
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
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.

778 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