I have in my table an image field called picture.There must be a better way than an if else statement to detect if the parameter is null and if so, not update that field.... IF (@picture Is NULL) BEGIN UPDATE tblEquipments SET assignedID = @assignedID, assetNumber = @assetNumber WHERE id = @id; END ELSE IF (@picture Is NOT NULL) BEGIN UPDATE tblEquipments SET assignedID = @assignedID, assetNumber = @assetNumber, picture = @picture WHERE id = @id; END END
It really wouldn't be a problem but I removed a lot of other fields here for a better read so the update is a lot longer.Any suggestions?Thanks,Zath