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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 comma delimited name column

Author  Topic 

MichaelC
Starting Member

5 Posts

Posted - 2008-05-22 : 14:25:17
I'm not sure it this is the correct forum, but here goes.

I am not a DBA, but rather a .NET developer that has been thrust into working on an SQL database created using documentation and modeling from another database. The data is provided by the state of NC in a fixed length format. Getting the data into the database is no problem. The problem is that one of the searchable columns, the name column, is populated with the full name delimited by commas. My first thoughts are to create columns for the different name parts. The problem with that is the names sometimes do not follow the "last, first, middle, suffix" pattern. Some names in the column are of other nationalities that may consist of about five or six name parts. On top of that there are instances where there may be two or three commas before, after or in the middle of the name data.

Searching the data as it is was simplified by creating a full-text index and searching the data with the containstable and near predicates and functions. The issue comes in when I the searcher needs to search for different spellings, either by the end user or the person that entered the data. Example: "Keith or Keeth". The FORMSOF function doesn't seem to do the trick when searching the name column.

I have experimented with the Soundex function provided in SQL but that really doesn't seem to work on the comma delimited column data either. I get way too much useless results to deal with considering there are over 30 million rows of data to search.

Does anyone have any suggestions on the best approach for this problem?
   

- Advertisement -