By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

Full-Text Searching using CONSISTS

P: 9
Hi

I've a list of Values with varchar field in main in a table. I wanted to have fast search as there are very less insertions/updations. Thought to do a FullText Searching on that varchar field.

Imp Note: The name column can be a phrase too.

I want to search on the key stroke from front end.
so should be able to search the name column on single charater or words.

declare @a varchar(10)

--to search a single value
--@a = 'a'
select name from tablename where CONSISTS(name,@a)

--to search a word starting with in the text
set @a = ' " ' + @a + ' *" '
select name from tablename where CONSISTS(name, @a)

--if searching a word
--@a= 'apple'
select name from tablename where CONSISTS(name,@a)

--If searching for a phrase and its continuation
--@a = 'apple and'
select name from tablename where CONSISTS(name,' "apple and*" ') --don't result any rows

--> this all worked out fine individually
But in stored procedure I need to write only one query
How to go on with this...
as I need to use * at the end...But for the last criteria It doesn't work out...
Plz suggest me a gud way to go on...
Aug 2 '07 #1
Share this Question
Share on Google+
5 Replies


JustJim
Expert 100+
P: 407
Don't mind me, just subscribing to find out more on this CONSISTS keyword.

Jim
Aug 2 '07 #2

missinglinq
Expert 2.5K+
P: 3,532
I can find no reference to a CONSISTS keyword in Access or VBA, and to be honest none of the code given here looks like VBA. What language are you referring to, sree078?

Welcome to TheScripts!

Linq ;0)>
Aug 2 '07 #3

JKing
Expert 100+
P: 1,206
The code given here looks more like SQL Server or perhaps MySQL can't remember which as I only touched on both briefly in my latest term of school. It's most definitely not Access. Though Access may be used as a front-end I believe this belongs in a seperate forum.
Aug 2 '07 #4

P: 9
sorry for not giving in the information regarding the languages used:

Backend: SQL SERVER 2000
Front End Form in C#.Net -- Visual Studio 2005

thanks
Aug 3 '07 #5

missinglinq
Expert 2.5K+
P: 3,532
You've posted this in the MS Access forum, which is unlikely to get you a resolution to your problem! I'll move the post to the .NET forum.
Aug 3 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.