473,787 Members | 2,932 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 1445
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
2255
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
2284
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
4287
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
14856
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
6824
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
4665
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
5580
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
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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
10169
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...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
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();...
1
4067
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.