473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

SELECT...LIKE: How to get '100' string whithout getting '45,100'

Hello

We've got a string field with some words, and I created a form
so that anybody could search someting into this field.

SELECT * FROM customer_table WHERE description LIKE '%query%'";

But if you search '100', it returns '45,100'. Or if you get
'plugged', it reurns 'unplugged'.

I tried with:
SELECT * FROM customer_table WHERE description LIKE '% query %'";
(note the blanks after and before)

But it does not work with a word in the beginning of the field.

Does anybody have any experience? Thank you very much.
Jul 20 '05 #1
1 4286
On 2003-09-10, Francesco Moi <fr**********@europe.com> wrote:
We've got a string field with some words, and I created a form
so that anybody could search someting into this field.

SELECT * FROM customer_table WHERE description LIKE '%query%'";

But if you search '100', it returns '45,100'. Or if you get
'plugged', it reurns 'unplugged'.

I tried with:
SELECT * FROM customer_table WHERE description LIKE '% query %'";
(note the blanks after and before)

But it does not work with a word in the beginning of the field.

Does anybody have any experience? Thank you very much.


You got quite near with your last try.

'% query %' finds alle query-Words surrounded by spaces
'query%' finds the word at the beginning
'%query' at the end

You know "OR"? :)

--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ctal | last post by:
I'm having a problem with a SQL statment. I've got two tables: Table Stage: Location Date Sales Exp Tax NewYork 1/1/01 100.50 5.75 11.25 and so on with...
4
by: Marek Mänd | last post by:
This seems an IE issue only: 4253 bytes testcase: http://www.hot.ee/idaliiga/testcases/ieselect/bnlinkingselectinmsie.htm Can one have 1) a mouseover/mouseout element on TBODY 2) change in...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
4
by: jessethepro | last post by:
Hi all, I have been racking my brain for days over the select() call. I use it to monitor a socket and stdin. I run the program in two terminal windows on localhost. The program is designed...
8
by: Jacob Arthur | last post by:
How would I go about using a custom select string that is passed from a form to the SelectCommand parameter of SqlDataSource? I tried: SelectCommand = "<% Request.Form("hdnSelect") %>" but I...
2
by: SFM | last post by:
I just want a simple datareader, that i can read the value returned from a select statement executed on a SQL server 2005 db. The code below should work in, but email= rdr.ToString(); when i...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
22
by: Rickster66 | last post by:
As Instructed this is a new thread regarding my original post: "Select Only 10 Columns Going Back" I'm sorry for the late response. I've been gathering up information and carefully with as much...
7
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.