Wednesday, 22 May 2019

Stored Procedure which Receiving Data Table as Parameter and save data in Sql Table

Create procedure sp_Test
@dt1 xml
as
begin
create table #hTable
(
 Code int
)

INSERT INTO #hTable
SELECT
xmlVals.rowvals.query('Code').value('.','int') as Code
FROM @dt1.nodes('/NewDataSet/Table') as xmlVals(rowvals)

select Code from #hTable

END

No comments:

Post a Comment