August 18, 2006 at 4:21 am
I want to export row sets from excel SQL server 2000 through DTS. I want to split Full_Name data field of excel into First Name and Last Name in SQL Server.
FullName of excel field has First Name and Last Name( Surname). These are separated by space.
please tell me how?
Paul
August 18, 2006 at 4:32 am
Paul
That all depends on what the full names look like. Are there any double-barrelled surnames or first names that consist of two separate words? If so, do they have a hyphen or a space in the middle? What about middle initials - do they have a "." after them or not. And middle names - are they to be included in the first name or discarded? Unless the names are in an absolutely consistent format, then you are going to have to go through them making judgement calls as to, for example, where the first name ends and the last name begins. Then you can write a function that splits them up. Look up the topic String Functions in Books Online for help on that.
There are several threads in this forum on the subject so please search for them and if you need any further guidance.
John
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply