sql - Split a row based on a column value -
I'm trying to split a row into two rows based on values in a cell on that row of an example For, I have the following table structure (this is a floating table without any keys, indexed or anything else and I can select the split results in other floating tables):
Col1 | Call 2a. A b Two c Three D | One two e One two then it should be divided into:
Col1 | Call 2a. A b Two c Three D | One d Two e An e The problem is that I can not understand how to start, I get these two questions which are similar, in my case it is an empty string instead:
I get this XML
SELECT col1, split.a.value ('.', 'Varchar (100)') from col2 (SELECT col1, col2, cast ('& lt; m & gt; Data (as in the form of AS2 as Col2 AS XML) Data. Nodes ('/ M') as AS Split (A))
Comments
Post a Comment