Create Procedure pro_Batch_Insert
@xmlParam xml
As
Insert Into t_TableName (ID, [Count])
(
Select
T2.ID.value('.', 'int') As ID, T3.[Count].value('.','int') As [Count]
From
(Select
T.Records.query('ID') As ID,
T.Records.query('Count') As [Count]
From
@xmlParam.nodes('/DataSet/Table') As T(Records)
) As T1
Cross Apply T1.ID.nodes('ID') As T2(ID)
Cross Apply T1.[Count].nodes('Count') As T3([Count])
)