Hello,I have the following SQL tables:create table dbo.Cubes( Id int identity not null constraint Cubes_Id_PK primary key clustered (Id), Name nvarchar (120) not null constraint Cubes_Name_U unique)create table dbo.CubesFiles( CubeId int not null, FileId int not null, constraint CubesFiles_CubeId_FileId_PK primary key clustered (CubeId, FileId))create table dbo.Files( Id int identity not null constraint Files_Id_PK primary key clustered (Id), Data varbinary (max) filestream null constraint Files_Data_DF default (0x), [Key] uniqueidentifier rowguidcol not null constraint Files_Key_U unique, Mime nvarchar (200) not null) filestream_on [STORAGE];
I need to select the last 80 cubes which contains files of type Image.A file of type image has Mime = "image/jpg" or Mime = "image/gif".I would like to select the Cubes without the File Data field (varbinary).1 - How can I do this?2 - Should I add a field Type in Cubes? When a Cube is created I would check the Files Mimes and add a Type. This seems redundant if I am able to do (1). But what do you think?Thank You,Miguel