CREATE TABLE [dbo].[CatalogueItemExtensionFields] ( [RowID] tinyint identity not null, [FieldType] tinyint not null, [Description] varchar(120) not null, [Nullable] bit not null, [DefaultValue] varchar(100) null, [Active_Flag] bit null, [OrderPriority] tinyint not null, [ContextGuid] uniqueidentifier not null);
set identity_insert CatalogueItemExtensionFields onINSERT INTO CatalogueItemExtensionFields (rowid, fieldtype, description, nullable, defaultvalue, active_flag, orderpriority) VALUES (1, 3, 'Product Group', 0, '', 1, 1)set identity_insert CatalogueItemExtensionFields off
set identity_insert CatalogueItemExtensionFields onINSERT INTO CatalogueItemExtensionFields (rowid, fieldtype, description, nullable, defaultvalue, active_flag, orderpriority) VALUES (1, 3, 'Product Group', 0, 'TEST STRING', 1, 1)set identity_insert CatalogueItemExtensionFields off
'Msg 245, Level 16, State 1, Line 7 Conversion failed when converting the varchar value 'test' to data type int.'
INSERT INTO CatalogueItemExtensionFields (rowid, fieldtype, description, nullable, defaultvalue, active_flag, orderpriority) SELECT 1, 3, 'Product Group', 0,NULLIF('',''), 1, 1 UNION ALLSELECT 2, 3, 'Product Group', 0,NULLIF('4',''), 1, 1