FYI .. print out of query which is working, now I'll move into making it better:
Select
a.jobId,
a.jobTitle,
a.jobShortDescription,
a.jobTypeId,
a.jobCategoryId,
a.employerId,
a.createDate,
b.city,
b.stateId,
b.province,
b.countryId,
c.stateAbreviation,
d.countryAbreviation,
e.employerName...
Jay ..
If I take the double quotes out I get the following error:
Server: Msg 7631, Level 15, State 1, Line 1
Syntax error occurred near 'developer'. Expected ''''' in search condition 'painter developer'.
Jay ..
You are seeing wildcards in the other search values because the user didn't select or enter anything into the form input, so I'm just getting all records .. I do plan on going back in cleaning it up a lot .. but at this time I'm mostly concerned with the full text search not giving me the...
Ok .. I got the error to go away, and the keyWords I'm passing are: painter developer
I thought that for full text search, it would go and find all records that have either one of those two keyWords, I'm I wrong about this ?
CODE:
Select
a.jobId,
a.jobTitle,
a.jobShortDescription,
a.jobTypeId...
Ok .. so there actually was no problem with the statement.
However if more than one word exists in the parameter of @keyWords, then I get the following error::
@keyWords = Developer Cook
Error: Syntax error occurred near 'Cook'. Expected ''''' in search condition 'Developer Cook'.
Gang .. sorry to bother again ..
I've tried the following in my dynamic stored proc::
Changed line that currently reads:
set @sql = @sql + 'AND a.keyWords like' + char(10) + '''' + '%' + @keyWords + '%' + '''' + char(10)
To:
set @sql = @sql + 'AND contains (a.jobTitle,' + char(10) + '''' +...
Ok guys ..
Got my full text search catalog created, I called it SearchKeyWords ..
Any tips on how to go about calling it from within my dynamic stored proc ?
Thanks Jay ..
I'm new to Full Text Searches .. so pls forgive me as I may seem disoriented ... anyhow, the stored procedure you see here takes data from a form which sends more than one parameter per request to the stored proc and those parameters can be integers and varchars. My question is...
Thanks Denny ..
I'm reading through all the documents right now, but I'm yet to find a case that would apply it in a dynamic stored procedure however .. do you have any examples ..
Hello Gang ..
I have a dynamic stored procedure which needs to be able to process as part of it's search a form field which may contain several words seperated by a space. ie: earth diamonds brazil ocean
My dynamic stored procedure works great, right now the parameter containing the form input...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.