Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to write this SQL?

Posted on 2001-08-21
7
Medium Priority
?
178 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 120 total points
ID: 6408854
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
ID: 6408904
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
ID: 6408954
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
Technology Partners: 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!

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6408959
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
ID: 6408998
SupWang meikl is from Germany I'm from Poland this means he should kill me too???
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6409027
i don't want to kill anyone
0
 
LVL 2

Author Comment

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

Featured Post

Independent Software Vendors: 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

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…
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…
Integration Management Part 2
Loops Section Overview
Suggested Courses
Course of the Month20 days, 19 hours left to enroll

810 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