473,799 Members | 3,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anti-Query

I'm writing a program that has an auto spelling correction feature. it is
kind of like google and ebay's spelling suggestion features (did you mean?:
correctly spelled word)
I need to write a sql query that does partial match, which is the exact
opposite as how you would do a wild card search.

Wildcard search example
---
Select id from table1 where message like 'i%like%food%'
--
it would yield results like these
"i like mexican food"
"i don't like this food"
"i like food in general"
>>>>>>>>>>> >>>>>>>>>

WHAT I NEED TO DO
I need to do the exact opposite of the example above
this is what i have in the database.
ID(autonumber) keywords(varcha r)
---------------- --------------------
1 i%like%food%
2 i%like%sports%
3 i%like%computer s%
and so on
What I would like to do is to input these sentences and get an output of the
wild card.
---pseudo code---
select id from table1 where keywords like 'i like food in general'
---
results:
'i%like%food%'
i hope this makes sense

Thanks in advance,

Aaron
Nov 22 '05 #1
2 1446
If I understand you correct... SELECT id From table1 WHERE Message
LIKE(MessageCol umn, ' ' , '%')

However, I'm not sure what this would accomplish so I am probably not
understanding the goal. If your actual query was select id from table1
where keywords like 'i like food in general'

You want it returned with % instead of spaces?
"Aaron" <ku*****@yahoo. com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I'm writing a program that has an auto spelling correction feature. it is
kind of like google and ebay's spelling suggestion features (did you mean?: correctly spelled word)
I need to write a sql query that does partial match, which is the exact
opposite as how you would do a wild card search.

Wildcard search example
---
Select id from table1 where message like 'i%like%food%'
--
it would yield results like these
"i like mexican food"
"i don't like this food"
"i like food in general"
>>>>>>>>>>>> >>>>>>>>>
WHAT I NEED TO DO
I need to do the exact opposite of the example above
this is what i have in the database.
ID(autonumber) keywords(varcha r)
---------------- --------------------
1 i%like%food%
2 i%like%sports%
3 i%like%computer s%
and so on
What I would like to do is to input these sentences and get an output of

the wild card.
---pseudo code---
select id from table1 where keywords like 'i like food in general'
---
results:
'i%like%food%'
i hope this makes sense

Thanks in advance,

Aaron

Nov 22 '05 #2
No that was not the query, it was only a example, everything after the WHERE
clause is fake.

say the user type in 'i like food in general'. the search engine would look
for this string a the keyword column.

the keyword column has records like

'a%apple%'
'a%airpline%'
'i%like%food%'

it would return 'i%like%food%' as result.

Thanks
"William Ryan" <do********@nos pam.comcast.net > wrote in message
news:OT******** ******@TK2MSFTN GP12.phx.gbl...
If I understand you correct... SELECT id From table1 WHERE Message
LIKE(MessageCol umn, ' ' , '%')

However, I'm not sure what this would accomplish so I am probably not
understanding the goal. If your actual query was select id from table1
where keywords like 'i like food in general'

You want it returned with % instead of spaces?
"Aaron" <ku*****@yahoo. com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I'm writing a program that has an auto spelling correction feature. it is kind of like google and ebay's spelling suggestion features (did you

mean?:
correctly spelled word)
I need to write a sql query that does partial match, which is the exact
opposite as how you would do a wild card search.

Wildcard search example
---
Select id from table1 where message like 'i%like%food%'
--
it would yield results like these
"i like mexican food"
"i don't like this food"
"i like food in general"
>>>>>>>>>>>>>> >>>>>>>>>

WHAT I NEED TO DO
I need to do the exact opposite of the example above
this is what i have in the database.
ID(autonumber) keywords(varcha r)
---------------- --------------------
1 i%like%food%
2 i%like%sports%
3 i%like%computer s%
and so on
What I would like to do is to input these sentences and get an output of

the
wild card.
---pseudo code---
select id from table1 where keywords like 'i like food in general'
---
results:
'i%like%food%'
i hope this makes sense

Thanks in advance,

Aaron


Nov 22 '05 #3

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

Similar topics

8
8185
by: jcnews | last post by:
I am using Windows XP and am learning how to program in Java. Is there any way to get my fonts to be anti-aliased in both editors and in my programs? The non anti-aliased fonts don't look very good and are a little harder on my eyes. Thanks.
0
2257
by: Jason | last post by:
Hi guys, I am having problems with VML. I had been working on a problem for sometime now, and I just recently discovered what the problem really was: VML was anti-aliasing my rectangles, but I didn't want it too. So I added the following attribute to my rectangles which solved the problem somewhat: antialias: false; On my monitor, the rectangles are drawn properly now, without anti-aliasing. However, when I print it to a printer, the
7
9544
by: Maxim Shemanarev | last post by:
I'd like to announce my project called Anti-Grain Geometry. http://www.antigrain.com Anti-Grain Geometry (AGG) is an Open Source, free of charge graphic library, written in industrially standard C++. The terms and conditions of use are very simple and described on the License page. AGG doesn't depend on any graphic API or technology. Basically, you can think of AGG as of a rendering engine that produces pixel images in memory from
17
2285
by: rgoya | last post by:
Peace be with you! About a year ago, I created a JavaScript which turns any web site into an online anti-war protest: http://www.geocities.com/rgoya/javascript/PROTEST.HTM I have recently revamped the anti-war quotes quiz: http://www.geocities.com/rgoya/javascript/PROTCODE.HTM#usaquiz Please feel free to
3
4289
by: Michel | last post by:
Is there a way I can anti-aliasing a gif to be able to get a hi-quality resizeable backgroundpicture. When a GIF of JPG is being resized by the browser you get wurse pictures because it needs a anti-aliasing. Maybe there is some filter for it... Or can I write my own subroutine to do this in client-browsers?
6
14858
by: bissatch | last post by:
Hi, I want to display text on screen with anti aliasing to make it appear smoother. Is it possible to do this in browsers by perhaps applying a style to it or is it entirely up the the browser? Cheers Burnsy
22
10773
by: Martin Eyles | last post by:
Hi, I have some text on a page in a small font. The font size has been OK in other applications, but in a web browser, the legebility suffers due to the anti-aliasing. Is there a way to turn off anti-aliasing for small text from the css, or is there something else I can do to make small text more legible? (Note, the text really does have to be small, as that is what is required for the web-application. It is a system for use on screens...
4
6825
by: Mike | last post by:
Hi, I took an interest a few months ago in an anti framebreaker javascript. All my research told me that it was impossible. If a website is loaded into a frame/iframe then if it has frame breaking javascript it will break out of that frame and there is nothing you can do about it except to screenscrape. So I decided to challenge that, and I wrote a counter javascript that forces a page to stay in a frame. It worked after months of...
2
4667
by: adam.timberlake | last post by:
I was following an article on a website earlier, and although it outputted the pie chart for me perfectly, I want to make it anti- aliased somehow. I have linked to the specific article below just in case you wish to replicate for testing the anti-aliasing. I found the GD function, imageantialias() but I've tried setting it to true at the top of the code just after the imagecreate() function - but to no avail. Article:...
6
5584
by: Roderik | last post by:
Hi, On my website I implemented tooltip alike layers when you hover the category items in the sidebar on the right. See: http://www.roderik.net/ The layers that become visible have a opacity value of .8 and contain a background image. The effect is as expexted. However, the anti-aliasing is very poor in both Internet Explorer 7 and
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10029
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.