Link to home
Start Free TrialLog in
Avatar of Errol Farro
Errol FarroFlag for Aruba

asked on

Seperate '~ seperated column' into new columns using MS SQL 2012

I have the below table and must get the "~ separated column" into new columns using MS SQL 2012.

The ~ seperated fields are all numeric

Any help is highly appreciated

Original Table
==============

mdmmid	mdComments
4602	11250~4138.97~28.07~100~3.33~18~15~~3000~
8941	11253~11045.94~45.94~175~2.00~30~11~~8036.50~
5612	11257~6225.7~615.70~150~2.50~24~12~~2004.50~
7560	11261~6133.84~0.00~100~1.67~36~13~~3700~
7118	11262~6645.88~0.00~255~3.33~18~14~~5000~

Open in new window


Desired result
==============
mdmmid	Value 1	Value2	Value3	Value4	Value5	Value6	Value6	Value8	Value9
4602	11250	4138.97	28.07	100	3.33	18	15		3000
8941	11253	11045.94	45.94	175	2	30	11		8036.5
5612	11257	6225.7	615.7	150	2.5	24	12		2004.5
7560	11261	6133.84	0	100	1.67	36	13		3700
7118	11262	6645.88	0	255	3.33	18	14		5000

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Bhavesh Shah
Bhavesh Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial