0
I have the following code:
IF OBJECT_ID('dbo.tabTeste') IS NOT NULL DROP TABLE dbo.tabTeste
GO
CREATE TABLE dbo.tabTeste (
id_tab INT IDENTITY PRIMARY KEY,
field1_tab VARCHAR(255),
paramsxml_tab XML)
GO
INSERT INTO dbo.tabTeste (field1_tab, paramsxml_tab)
SELECT 'Teste','<row war_dat="1" war_ini="2" war_end="3"></row>'
GO
SELECT * FROM dbo.tabTeste
which results in:
id_tab - field1_tab - paramsxml_tab
1 - Teste - '<row war_dat="1" war_ini="2" war_end="3" />'
As in this SELECT transform the values of xml attributes into columns ?
id_tab - field1_tab - war_dat - war_ini - war_end
1 - Teste - 1 - 2 - 3