How to split a single column values to multiple column values?

Posted by Shahsra on Stack Overflow See other posts from Stack Overflow or by Shahsra
Published on 2011-02-25T22:52:13Z Indexed on 2011/02/25 23:25 UTC
Read the original article Hit count: 327

Hi All,

I have a problem splitting single column values to multiple column values.

For Example:

**Name**

abcd efgh

ijk lmn opq

asd j. asdjja

asb (asdfas) asd

asd

and I need the output something like this:

first_name             last_name

abcd                     efgh  

ijk                      opq

asd                      asdjja

asb                      asd

asd                      null

The middle name can be omitted (no need for a middle name) The columns are already created and need to insert the data from that single 'Name' column.

Thanks a lot, Shahsra

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server