Find if a letter's are present inside a text in sql server 2012 -
select cat.categoryid ,cat.categoryimageurl ,cat.categoryname ,cat.isdeleted ,ap.appcreatedby ,ap.appcreatedon ,ap.appdetails ,ap.appid ,ap.appimageurl ,ap.appmodifiedby ,ap.appmodifiedon ,ap.appname ,ap.isdeleted ,subcat.subcategoryid ,subcat.subcategoryname ,subcat.subcategoryimageurl category cat inner join app ap on cat.categoryid = ap.categoryid inner join subcategory subcat on subcat.subcategoryid = ap.subcategoryid freetext ( cat.categoryname ,@searchparameter ) or freetext ( subcat.subcategoryname ,@searchparameter ) or freetext ( ap.appname ,@searchparameter ) or contains ( ap.appdetails ,@searchparameter ) or contains ( cat.categoryname ,@searchparameter ) or contains ( subcat.subcategoryname ,@searchparameter ) or contains ( ap.appname ,@searchparameter ) or contains ( ap.appdetails ,@searchparameter ) use [appstore] go declare @return_value int exec @return_value = [dbo].[indianappstore_search] @searchparameter = n'wishpicker' select 'return value' = @return_value go
in appname column in app table there row contains wishpicker appname want show result if user writes wish search query.
is possible freetext or other search algo in sql server?
read on keyword. in short...
where (ap.appname 'wish%') -- finds app names beginning wish (ap.appname '%wish%') -- finds app names containing wish (ap.appname '%wish') -- finds app names ending wish
Comments
Post a Comment