0

I am using SQL Server 2005 Express (not mysql).

I have a string

str = 'E1 ; abc ; E2 ; def';

I want to split string str with respect to delimiter ; and then insert values into table as follows:

Name       Value
E1          abc
E2          def

Please help, thanks in advance !!!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Adwait
  • 23
  • 6
  • Do you have to use tsql or can you use a programming language like VB, which has a split function? – w0051977 Nov 03 '13 at 09:00
  • @PaulDraper - This is slightly different as the delimiter is delimiting both rows and columns within a row rather than just rows. – Martin Smith Nov 03 '13 at 10:01
  • I suppose the end result is different. The essential part (which is common) is splitting the string. – Paul Draper Nov 03 '13 at 10:07

0 Answers0