Yes i find a way to update my fields with openxml in store proc in sql but

Is there a way to avoid having null value to my update command...

I got an xml in paramaters of my store proc and then update just the columns that i have in my string.. but when i do update it updates all of them.. and the field that i dont have in my xml well. they get a null value.. but i want to keep the correcte one in the column in the table !!


EXEC sp_xml_preparedocument @handle OUTPUT, @data
begin transaction
SELECT * FROM TblTypeSalle WHERE IdTypeSalle = 153

TblTypeSalle.IdTypeSalle = iox.[IdTypeSalle],
TblTypeSalle.bEvenement = isnull(iox.[bEvenement],0),
TblTypeSalle.bModeTest = isnull(iox.[bModeTest],0),
TblTypeSalle.sNomTypeSalle = iox.[sNomTypeSalle],
TblTypeSalle.imgSalle = iox.[imgSalle],
TblTypeSalle.IdSalle = iox.[IdSalle],
TblTypeSalle.sDescription = iox.[sDescription],
TblTypeSalle.sFontColor = iox.[sFontColor],
TblTypeSalle.nFontSize = iox.[nFontSize],
TblTypeSalle.bFontBorder = isnull(iox.[bFontBorder],0),
TblTypeSalle.sBackColor = iox.[sBackColor],
TblTypeSalle.sDescription_En = iox.[sDescription_En],
TblTypeSalle.[sNomTypeSalle_En] = iox.[sNomTypeSalle_En]

FROM OPENXML (@handle, N'//TblTypeSalle')
WITH TblTypeSalle iox
WHERE TblTypeSalle.IdTypeSalle = 153

SELECT * FROM TblTypeSalle WHERE IdTypeSalle = 153
EXEC sp_xml_removedocument @handle