Re: SQL Question
Posted in 1997
"Hawk's Talon" <hawk@ao.net> wrote: :Reply-To: nikel@bellsouth.net : : I have the following SQL/SPL question. : :I am pulling a field from a linked database which contains a persons full :name, i.e. Frank, Smith Allen. I need a way to split this data into three :variables so that I can store the information into three seperate fields :within a table in my database. The ideal solution would be to get the owner :of the other database to make the change, but unfortunetly, I am on the :lower end of that power curve. If you do realy store names in this format in one field in your database it's about time you get the requirement to split it. Such names shouldn't even be printed on invoices, much less on marketing material. Too many people dislike seeing their names this way. And what is the way realy? Is Allen the middle name? :If any one has any suggestions, I would greatly appreciate them. Don't even attempt this with sql or spl. There are too many complications unless you have a very high quality on the names. Here are only a few conceivable ways the above name could have been entered: Frank. Smith Allen Frank, Smith A. Frank, S.A. Frank, S. A. Frank. S. A. Frank Smith Allen Frank Allen Smith Smith, Frank Allen If you don't have too much of these kinds of problems it should be reasonably easy to do all this in any application language (4GL, C, Delphi or whatever you use). If you have a very large number of such names, the correctness is highly important to your organization and there are a significant number of problematic cases, you might be best off having one of the several companies that specialize in these issues do the conversion for you. They typically have a significant number of techniques, such as first and last name tables and advanced algorithms to realy do it properly. I don't remember the names of these companies in the US, but someone else might be able to help you, or you might be able to find them on the net. They do have web pages. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org