Topic: Does not materialize a calculated column because of it
Kind time of days!
I try to create the table with a rated column which should be materialized:
CREATE TABLE Geographical_koordinates ( Id_Geographical_koordinates int NOT NULL IDENTITY (1,1) PRIMARY KEY; Koordinate geography NOT NULL; SRID INT NULL; Radius_action INT; All_koordinates_area AS Koordinate. STBuffer (Radius_action) PERSISTED; Koordinate_text AS Koordinate. STAsText () PERSISTED; All_koordinates_area_txt AS dbo. AreaInText (Koordinate, Radius_action) PERSISTED; Heigh_sea_level int NULL; description nvarchar (50) NULL); GO
CREATE FUNCTION [dbo]. [AreaInText] (@Koordinate geography, @Radius_action int) RETURNS nvarchar (max) AS BEGIN DECLARE @area geography; DECLARE @areaText nvarchar (max); SET @area = Koordinate. STBuffer (@Radius_action); SET @areaText = area. STAsText (); RETURN (@areaText); END GO
In 8th line I use function which does not address to the exterior data and uses only functions STAsText () and STBuffer () which did not find in the list determined and not determined. But as for 6 and 7 line where the same functions SQL are used does not swear and accepts them accordingly they should be determined. But for some reason produces an error:
The message 4936, level 16, state 1, line 4 It is impossible to materialize a calculated column "All_koordinates_area_txt" in the table "Geographical_koordinates" as it is not determined.
Why the column all the same turns out not determined?
It can be corrected somehow?