I am trying to simulate wild card search like for example:

cran* would return any word containing 'cran' at the begining
*cran would return any word containing 'cran' at the end
*cran* would return any word containing 'cran' in the middle

Here is whay I am doing but it does not work

SELECT whatever FROM aTable WHERE this = that AND CONTAINS(aColumn,
"cran+%")

I am fetching data from an SQL Server using full text indexing

Any help will be appreciated


--
Dino Buljubasic
Software Developer
http://rivusglobal.com

Re: Wild card search by Lyndon

Lyndon
Tue Sep 16 14:30:55 CDT 2003

On Mon, 15 Sep 2003 20:40:32 GMT, "Dino M. Buljubasic"
<dino.buljubasic@rivusglobal.com> wrote:

>I am trying to simulate wild card search like for example:
>
>cran* would return any word containing 'cran' at the begining
>*cran would return any word containing 'cran' at the end
>*cran* would return any word containing 'cran' in the middle
>
>Here is whay I am doing but it does not work
>
>SELECT whatever FROM aTable WHERE this = that AND CONTAINS(aColumn,
>"cran+%")
>
>I am fetching data from an SQL Server using full text indexing
>
>Any help will be appreciated
If cran is a variable then shouldn't it be "%" + cran +"%" ?

Re: Wild card search by Dino

Dino
Tue Sep 16 17:47:00 CDT 2003

No, "cran" is not a variable. It is the word I am searching for. :)


"Lyndon Hills" <lyndon@nospam.tenegi.com> wrote in message
news:o4pemv8il6t658nhtuhv3qqjhija621pvb@4ax.com...
> On Mon, 15 Sep 2003 20:40:32 GMT, "Dino M. Buljubasic"
> <dino.buljubasic@rivusglobal.com> wrote:
>
> >I am trying to simulate wild card search like for example:
> >
> >cran* would return any word containing 'cran' at the begining
> >*cran would return any word containing 'cran' at the end
> >*cran* would return any word containing 'cran' in the middle
> >
> >Here is whay I am doing but it does not work
> >
> >SELECT whatever FROM aTable WHERE this = that AND CONTAINS(aColumn,
> >"cran+%")
> >
> >I am fetching data from an SQL Server using full text indexing
> >
> >Any help will be appreciated
> If cran is a variable then shouldn't it be "%" + cran +"%" ?



Re: Wild card search by Lyndon

Lyndon
Wed Sep 17 14:04:29 CDT 2003

On Tue, 16 Sep 2003 22:47:00 GMT, "Dino M. Buljubasic"
<dino.buljubasic@rivusglobal.com> wrote:


>
>
>"Lyndon Hills" <lyndon@nospam.tenegi.com> wrote in message
>news:o4pemv8il6t658nhtuhv3qqjhija621pvb@4ax.com...
>> On Mon, 15 Sep 2003 20:40:32 GMT, "Dino M. Buljubasic"
>> <dino.buljubasic@rivusglobal.com> wrote:
>>
>> >I am trying to simulate wild card search like for example:
>> >
>> >cran* would return any word containing 'cran' at the begining
>> >*cran would return any word containing 'cran' at the end
>> >*cran* would return any word containing 'cran' in the middle
>> >
>> >Here is whay I am doing but it does not work
>> >
>> >SELECT whatever FROM aTable WHERE this = that AND CONTAINS(aColumn,
>> >"cran+%")
>> >
>> >I am fetching data from an SQL Server using full text indexing
>> >
>> >Any help will be appreciated
>> If cran is a variable then shouldn't it be "%" + cran +"%" ?
>
>No, "cran" is not a variable. It is the word I am searching for. :)

Ok the contains clause should be (aColumn,"cran*")

I'm not sure that you can do *cran or *cran*.