I am really not sure what the error below is, but this statement works perfectly in Azure SQL Database but not on Azure SQL Data Warehouse. Is there anything specific to computed columns in SQL Data warehouse?
Here is the simple create table statement I am trying
CREATE TABLE Authors
(
AuthorId int IDENTITY(1,1) NOT NULL,
FirstName nvarchar(100),
LastName nvarchar(100),
FullName AS (FirstName + SPACE(1) + LastName) -- computed column
)
And the error:
Msg 103010, Level 16, State 1, Line 1
Parse error at line: 6, column: 11: Incorrect syntax near 'AS'.
see Migrating Computed Columns
Computed columns are not supported in memory-optimized tables. However, you can simulate a computed column.
The reference suggests using a view to mimic the effect of non-persisted computed columns.
For persisted computed columns the reference proposes the use of stored procedures (one to insert another to update).
You would need to asses if the benefits of persisted data outweighs the simplicity of using views.