1

I have a computed column with size = 8000:

(json_value([content],'$.UserId'))

I am trying to change it to:

(CONVERT(varchar(50),json_value([content],'$.UserId')))

But I have the followin error:

Error validating the formula for column userId_cp

enter image description here

why?

  • Stop using the designers in SSMS. They're full of bugs. The ability to *script* an object into a new query window as an `ALTER` statement is a far better starting point for making changes. – Damien_The_Unbeliever Dec 10 '21 at 08:16
  • It doesn't work: ALTER TABLE Messages ALTER COLUMN [userId_cp] (CONVERT([varchar](50),json_value([content],'$.UserId'))) PERSISTED; – Aleksander Chelpski Dec 10 '21 at 08:26
  • You can't `ALTER` a computed column; you must `DROP` and recreate it. – Thom A Dec 10 '21 at 08:32

0 Answers0