I need to do an update to the t_appeal table and update all the appeals to inactive whose end date has passed. I wrote this simple query:
update t_appeal
set inactive = 'Y'
where end_dt < getdate()
and inactive = 'n'
But I get the following error.
“The column "inactive" cannot be modified because it is either a computed column or is the result of a UNION operator.”
Has anyone written a query to do this or do you have an idea of the best way to go about making this work.
Thanks
I figured it out. You need to change the Status to c then it will change the Inactive to Y.
This is the code.
set status = 'c'
This is a great idea. I've already stolen your code and made a SQL job. Keep em comming!