hi Lynn Pettis
i used the function to split the words which was given in the parameter
@values=' the city words'
the
city
words
and it has to check the data s related column which i joined
s.BusinessName LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.ContactPerson1 LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.ContactPerson2 LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.AddressLine1 LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.AddressLine2 LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.City LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.CountryCode LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.Landmark LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.State LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.Pincode LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.Locality LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.Mobile LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.Telephone LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
b.Email LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Items)), ' ', '%' ) + '%'
or
b.Website LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
ac .CategoryName LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
or
sb.SubCategoryName LIKE '%'+ REPLACE(RTRIM(LTRIM(ds.Item)), ' ', '%' ) + '%'
the original store proc it which i mentioned there was working but it take more than 10 minutes to execute
the procedure
sorry Lynn Pettis if anything hurts u i am sorry