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.
| Author |
Topic |
|
philco
Starting Member
1 Post |
Posted - 2001-11-23 : 22:56:25
|
| I am using SQL Server 7. I'm new to full-text searches.I have a full-text catalog on Artists.FName and Artists.LName called Artists_Catalog. In Query Analyzer this works:select distinct ArtistID, LName, FNamefrom ArtistsWHERE contains(Artists.*, '"jOHN*"')order by Artists.LNameHowever, when I try to create a store proc version in which I can pass a string in as the search parameter, it won't compile. Error 170 reported at @strQuery in where clause. CREATE procedure spSearchArtists@strQuery varchar(128) asselect distinct ArtistID, LName, FNamefrom Artistswhere contains(Artists.*, @strQuery)order by Artists.LNamereturnNot sure where I'm going wrong on the syntax. Can someone help out?thanks!philco |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2001-11-26 : 15:58:33
|
| Try using Dynamic SQL. See Merkin's articles at[url]http://www.sqlteam.com/item.asp?ItemID=4599[/url] and [url]http://www.sqlteam.com/item.asp?ItemID=4619[/url]-------------------It's a SQL thing... |
 |
|
|
|
|
|