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
 General SQL Server Forums
 New to SQL Server Programming
 error in stored procedure

Author  Topic 

sparrow37
Posting Yak Master

148 Posts

Posted - 2009-12-19 : 12:46:47
Hi all,




I have following stored procedure:



ALTER



@grStoreArea

procedure [dbo].[USgrStoreView]varchar (3000)

as



begin



BEGIN



SELECT

TRANSACTION grStoreID, grStoreName as Butikk, geoCity as Område, geoStreet as Addresse, grOpening as Åpningstid

FROM

USgrStore

WHERE

CONTAINS (grStoreArea, @grStoreArea)

COMMIT



which is giving error:



Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'USgrStore' because it is not full-text indexed.

Regards,

Asif Hameed

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-19 : 14:06:43
Seems pretty explicit. You are trying to use a full-text function, but your table isn't full-text indexed.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

sparrow37
Posting Yak Master

148 Posts

Posted - 2009-12-19 : 14:39:50
how can i solve this issue ? what should i use instead of contains ?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-19 : 14:42:40
You can use LIKE instead.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-12-20 : 02:52:54
or even PATINDEX
Go to Top of Page
   

- Advertisement -