ALTER PROCEDURE [dbo].[USP_TestUpdateCCLogCards]
(
@xml varchar(max)
)
as
begin
BEGIN TRY
DECLARE @Doc int
exec sp_xml_preparedocument @Doc OUTPUT,@xml
update c
set c.CardNo = XMLProdTable.card
--select p.Card,p.PaymentID,XMLProdTable.paymentid
FROM OPENXML(@Doc, 'payments/data', 1)
WITH (
CustCardID Int,
card varchar(2000)
) XMLProdTable
INNER JOIN CCLOG c
ON c.LogID = XMLProdTable.CustCardID
EXEC sp_xml_removedocument @Doc