open xml file sql server

Solutions on MaxInterview for open xml file sql server by the best coders in the world

showing results for - "open xml file sql server"
Victoria
11 Jan 2018
1ALTER PROCEDURE manageImpactItemsList
2	@ImpactXml,
3    @ProductID
4AS
5BEGIN
6 DECLARE @Handle INT;
7    
8 EXEC SP_XML_PREPAREDOCUMENT(@Handle OUTPUT, @ImpactXml);
9    
10 INSERT INTO ImpactItemsList_tbl(ProductID, ImpactItem, ImpactID, Answer)
11 SELECT  X.ImpactItem, X.ImpactID, X.Answer FROM OPENXML(@Handle, '/RT/ITEM', 2)
12 WITH(
13   ImpactItem VARCHAR(50) 'ImpactItem',
14   ImpactID INT 'ImpactID',
15   Answer VARCHAR(100) 'Answer',
16 ) AS X;
17    
18 EXEC SP_XML_REMOVEDOCUMENT(@Handle);
19    
20 RETURN 'SUCCESS';
21END    
similar questions
database xml sql