The situation – I have a computed column that I want to alter in SQL Azure
After googling away it turns out you cannot alter a computed column what you have to do is drop it and then re-create it again..
Bit disappointing – I then thought maybe I can just alter the function – Foiled AGAIN – that MIGHT have been possible but for the fact I needed to introduce an additional parameter into the function and that won’t work as I have to alter the parameter definition in the column definition which again is an alteration of the column..
Oh well
You might want to take a minute to compose yourself / make sure you’ve got a backup and then I guess go for it!
ALTER TABLE dbo.t002table1 DROP COLUMN DistillPeriod ALTER TABLE dbo.t002table1 ADD DistillPeriod AS ([dbo].[calculatematuration]([t002table1].[dateoffill],getdate(),[t002table1].[disgorgedate]));