Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transform String Into Multiple Columns

Status
Not open for further replies.

matrun

IS-IT--Management
Jan 13, 2004
26
GB
Hi there - in Oracle SQL - does anyone know how to take a string and split it into multiple columns, where the number of distinct strings, and therefore output columns, is variable?

For example;

Name:
Matt Rundle
John Smith
Warren Hubert Jones
Martine Louise Jane Smith

would go to:
Matt|Rundle
John|Smith
Warren|Hubert|Jones
Martine|Louise|Jane|Smith

Where a pipe represents a new column.

Any help much appreciated!

Regards

Matt
 
Hi Matt. Your two posts sound very much like homework assignments. Are they?

I want to be good, is that not enough?
 
Hi - er, well see other post. Do you mean homework as in school homework??! no, i'm just posting on this forum like i've always done. i've never had a problem before! i manage a database team but am not a dba, so when i do need to write these kind of queries i sometimes need some expertise to help me. is this not what these forums are for? i can see similar queries there that others respond to without talking about homework!
 
Matrun, having seen this response and the one you made in the other thread, I apologise for doubting your intentions. We try to run a tight ship in following Tek-Tips' 'rules', but appreciate that this sometimes results in our misinterpreting questions. Apologies again and have a good weekend!

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top