Import SOAP XML response in Database Table using SQL Server

Last Reply 5 months ago By pandeyism

Posted 5 months ago

I am working with an XML from SQL Server and I want to import the data into a sql table, but I fill the rows with null values, here the code that I'm testing : 

DECLARE @XML XML = ' 0 93183 9 16 6 AP_Bavaria AP_BAVARIA BAVARIA false 2 2019-04-24T12:14:10 2 2019-05-07T12:03:13 true '; 
INSERT INTO borrar_inforUsersPrueba (Id_SegUSU ,Id_CLIE ,Id_CLIESede ,Id_SegPerfil) 
SELECT r.value('Id_SegUSU[1]','bigint') 
AS Id_SegUSU ,r.value('Id_CLIE[1]','bigint')
AS Id_CLIE ,r.value('Id_CLIESede[1]','bigint') 
as Id_CLIESede ,r.value('Id_SegPerfil[1]','int') as Id_SegPerfil) as Mail 
FROM @xml.nodes('/*:Envelope/*:Body/*:RetrieveUserByLoginResponse/*:RetrieveUserByLoginResult/*:User') AS A(r)