TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
fancy
NA
13
4.1k
Split string and loop through against a table
May 6 2013 4:47 PM
I have a string for e.g." Wills Smith & family, Practitioner "
I want to search keywords against a 'Company' table to determine whether the string suggests a company name or its just a persons name..
I have a table in database named as 'Company' with a single column 'Name' .
The values would be 'family','Sons','Inc.' etc . So if any of the word in the string above matches this column I should return true. Like in this case 'family' matches.
I want to break above string in store procedure as array and loop through the table to find if any of the word in the string matches in table. As soon as I get one match I want to exit . So I want to query backwards in the string as mostly company names are last word like 'inc' etc .
I am looking for good approach to solve this. I am using visual studio and sqlserver (store proc)
Reply
Answers (
4
)
How to find and delete Duplicate Records from SQL Server
Incorrect syntax near the keyword 'if'