sql - Materialize computed column's data -
i have problem table 1 column computed column "fragile" , slightest changes causes break. wondering of common methods of materializing data computed column (also because computed columns can't indexed)
for reference, computed column spatial data generated following statement:
geometry::stgeomfromtext('linestring('+convert(nvarchar(20),ipstartnumber)+' 0,'+convert(nvarchar(20),ipendnumber)+' 0)',0)
alter table maikng computed column persisted column.
alter table [dbo].[test] ( [id] [int] not null, [computedcloumn] (geometry::stgeomfromtext('linestring('+convert(nvarchar(20),ipstartnumber)+' 0,'+convert(nvarchar(20),ipendnumber)+' 0)',0)) persisted ) go
Comments
Post a Comment