Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to parse below xml to a row , the only problem is all values mentioned in Attribute are actually column names.
We can see , "C" is a name of column and its value is "value1" and "value2"
I want the values as below
ItemID | c | LoginTimestamp |
value1 | 11/19/2019 8:01 | |
value1 | 11/19/2019 8:30 |
Can this be achieved without using Pivot ??
<Users> <Items> <UserProperty> <Attribute>ItemID</Attribute> <Value/> </UserProperty> <UserProperty> <Attribute>c</Attribute> <Value>value1</Value> </UserProperty> <UserProperty> <Attribute>LoginTimestamp</Attribute> <Value>11/19/2019 8:01:59 AM</Value> </UserProperty> </Items> <Items> <UserProperty> <Attribute>ItemID</Attribute> <Value/> </UserProperty> <UserProperty> <Attribute>c</Attribute> <Value>value2</Value> </UserProperty> <Attribute>LoginTimestamp</Attribute> <Value>11/19/2019 8:30:12 AM</Value> </UserProperty> </Users>
We used Quotes "" , while Pivoting the content , to avoid issue with delimiters
Problem with tPivotToColumnsDelimitedis with the delimitter , because the XML data has , | ; and other commonly used delimitter
We used Quotes "" , while Pivoting the content , to avoid issue with delimiters