I am trying to insert some Data in a Table where the ID is int. The Id is unique and I have no idea why the developer of this software have not set this field to auto_increment
So normaly this would work, because with auto_increment I would exlude the ID and it would be filled automatically.
Insert into [dbtest].[dbo].[tArtikelAttribute]
([kArtikel] ,[cName] ,[cValue])
Select [kArtikelAttribute], kArtikel, 'han', cHan
from [dbtest].[dbo].[tartikel] Where cHan is not NULL
I getting this error
Msg 515, Level 16, State 2, Line 2 The value NULL can not be inserted into the kArtikelAttribute column dbtest.dbo.tArtikelAttribute table. The column does not allow nulls. Error in INSERT. The statement has been finish
The table [tArtikelAttribute] is
ID (PK, int, Not Null)
kartikel (int, null)
cname (varchar(255), null)
cvalue (varchar(4000), null)
I wouldn´t want to change the fields attributes so I do not interfere with the software functionalitys Does anyone know how to do this?
thanks