Manoj Bisht

Manoj Bisht

  • NA
  • 140
  • 0

Generate columns from a table column having XML string

Jan 12 2017 6:13 AM
 In a table column i've data as given below
 
<PivotSet>
   <item>
      <column name = "RNO">1</column>
      <column name = "MIN(INSGRP)">Record- 001</column>
   </item>
   <item>
      <column name = "RNO">2</column>
      <column name = "MIN(INSGRP)">Record- 002</column>
   </item>
   <item>
      <column name = "RNO">3</column>
      <column name = "MIN(INSGRP)">Record- 003</column>
   </item>
   <item>
      <column name = "RNO">4</column>
      <column name = "MIN(INSGRP)">Record- 004</column>
   </item>
   <item>
      <column name = "RNO">5</column>
      <column name = "MIN(INSGRP)">Record- 005</column>
   </item>
   <item>
      <column name = "RNO">6</column>
      <column name = "MIN(INSGRP)">Record- 006</column>
   </item>
</PivotSet>">
 
 so i want to generate six columns into new table from this column data given above. this is single column data of a row. Each row hold this kind of column of xml string.

Columns may be dynamic i.e. may be other 1 or 2 or .....
 
INSGRP1       INSGRP2       INSGRP3      INSGRP4      INSGRP5      INSGRP6
Record- 001   Record- 002   Record- 003  Record- 004  Record- 005  Record- 006
 

Answers (1)