I have this SQL-Server query
UPDATE qryPETEUR_frmPricingModel() SET [%debtToEBITDA] = '498116.0000' WHERE comp_id = '10004'
Which fails because Update or insert of view or function 'qryPETEUR_frmPricingModel' failed because it contains a derived or constant field.
I know the issue is because of the % symbol because when I update other fields it works. Unfortunately I cannot change this field name so I am stuck with it. I think I need to escape the % symbol and I added a \ in front of it but that didn’t work.
What can I do to get this query working?
I am also using Code Igniter if that helps.
EDIT: ConradFrix is on the right track in that %debtToEBITDA is a derived field and I can’t change it the way I am trying too. I took a look at the function qryPETEUR_frmPricingModel and discovered I needed to be changing a different field. So I think this question is done. Thanks.
You haven’t read the error message. It says nothing about a syntax error. The problem is not a syntax error.
It tells you that you cannot update a computed column. Try to update the source columns which are used to compute the computed column.