Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 full text search

Author  Topic 

Jacek
Starting Member

2 Posts

Posted - 2008-09-19 : 14:58:47
Hi everybody !
In my SQL Server 2005 on a one table I created full text search.
All is ok, but I need to create select contains only a part of text.
For example:

1. I look for everything what contains a word 'description':

select * from table where contains(*,'description')

2. I look for everything with prefix 'descrip':

select * from table where contains(*,'"descrip*"')

3. and now I need look for everything what contains only a part of word 'description'. I need to create select similar to:

select * from table where field like '%cript%'

How can I do it in full text search ?

Best regards ,
Jacek

lepeniotis
Yak Posting Veteran

75 Posts

Posted - 2008-09-22 : 08:20:18
According to Microsoft Press and the Self training paced kit, book one, exam 70-431, for full text search you have to write

CONTAINS(nameofthecolumn,'"word*"')

I haven't done that before in real life but I think that if it is an exam question, this should work!

MSc Advanced Computing Science
MSc Database Professional
Sheffield Hallam University
MCP (70-229, 70-228)
Industrial IT Engineer
Go to Top of Page

Jacek
Starting Member

2 Posts

Posted - 2008-09-23 : 08:01:13
Hi, your idea is absolutely correct, but how can I solve following problem?

CONTAINS(nameofthecolumn,'"*ord*"')

where asterisk there is before and after any word?
Regards
Jacek
Go to Top of Page

lepeniotis
Yak Posting Veteran

75 Posts

Posted - 2008-09-23 : 08:10:53
No its only at the end of the word!! Thats what the book says! on the tests had an option with the asterisk in front and at the end and the correct was only the one that I told you on my previous post!

Regards

MSc Advanced Computing Science
MSc Database Professional
Sheffield Hallam University
MCP (70-229, 70-228)
Industrial IT Engineer
Go to Top of Page
   

- Advertisement -