Hi,
I've modeled a varchar(max) column as a knotted attribute that i use to store thumbnail images. This results in error:
----------------------------------- [Knot Table] -------------------------------------
-- THU_Thumbnail table
--------------------------------------------------------------------------------------
IF NOT EXISTS (SELECT * FROM sys.objects WHERE name = 'THU_Thumbnail' and type LIKE '%U%')
CREATE TABLE [dbo].[THU_Thumbnail] (
THU_ID int identity(1, 1) not null,
THU_Thumbnail varchar(max) not null unique,
Metadata_THU int not null,
primary key (
THU_ID asc
)
);
This results in error:
Column 'THU_Thumbnail' in table 'THU_Thumbnail' is of a type that is invalid for use as a key column in an index.
I guess this is a (small) bug.
I get around it by manually removing "unique" from the varchar(max) line, and maintaining uniqueness in my ETL.
Ivo