JLone
JLone

Reputation: 115

SSIS Rearrange Full Name In Same Column

I have an excel file to load into my database, I'd like to rearrange the name field to this

FIRSTNAME M LASTNAME

instead of the format it's in now which is

LASTNAME, FIRSTNAME M.

to keep it consistent with a previous load I have loaded into my database. Is it possible to do this somehow and put it into the same column? I've searched, and have only found that people have been wanting to split them into multiple columns.

Thanks in advance.

Upvotes: 3

Views: 294

Answers (1)

Tab Alleman
Tab Alleman

Reputation: 31775

You could do this with a derived column that nests and concatenates a bunch of substrings. I don't have an example handy, but the substring function is well documented and it should just be a matter of spending the time required to figure it out.

Another option would be to handle this in a script transformation, if you're more comfortable with string manipulation in a .net language.

Upvotes: 1

Related Questions