problem with spaces in full text search using contanis....

declare @keyword = 'Phil stein corporate photography fine art'

set @keyword = replace (@keyword,' ',' near ')

print @keyword = Phil near stein near corporate near photography near fine near art

The above mentioned syntax working well....

but if there is multiple spaces between words then the problem in arises...

Suppose

declare @keyword = 'Phil stein corporate photography fine  art' (there is the multiple spaces between fine and arts)

set @keyword = replace ( @keyword,' ',' near ')

print @keyword = Phil near stein near corporate near photography near fine near near art

then my query returns a error message " syntax error near art in the full text search condition .........."

My requirement is if there is several multiple spaces between words then spaces must be replaces with one near clause..

please help....

July 5th, 2013 6:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics