Solved

How to write this SQL?

Posted on 2001-08-21
7
160 Views
Last Modified: 2010-04-06
Hi all,

The DB has a color field.
When user enters "RED" at a TEdit, then will return some records.
Their fields value is "RED;Blue;Black;" or "RED" or "RED;Blue;".....

How to write this SQL?

Regards, supwang
0
Comment
Question by:SupWang
  • 3
  • 2
  • 2
7 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 30 total points
Comment Utility
select * from atable where colorfield like :color

use this code

query1.close;
query1.parambyname('color').AsString := '%'+edit1.text+'%'; //containing or
//query1.parambyname('color').AsString := edit1.text+'%'; //starting with
query1.open;

meikl ;-)

0
 
LVL 2

Author Comment

by:SupWang
Comment Utility
Hi meikl,
Why German don?t kill more Israelite? The Israelite is very bad.
Now I very happy to see they be bombed. Those Palestinian hero...
KZ
0
 
LVL 21

Expert Comment

by:ziolko
Comment Utility
SupWang what the fu** are You talking about, this site is about programming not politics (I didn't see any politics topic around here)
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
hmm,
i didn't have anything against the israelite,
and the holocaust was before my lifetime,
even if i don't understand their doing at this time

this isn't a theme for this q

meikl ;-)
0
 
LVL 21

Expert Comment

by:ziolko
Comment Utility
SupWang meikl is from Germany I'm from Poland this means he should kill me too???
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
i don't want to kill anyone
0
 
LVL 2

Author Comment

by:SupWang
Comment Utility
No. No.  
I means israelite is very bad. always attack their neighbor.
I am a Chinese.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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