When i am trying to Copy data from one database to another database table of Same Sql instance getting the error.
i am using Nav 2013 Databases.
SQL error:
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column ‘Name’, table ‘NEWDB.dbo.UCC$CustDB2’; column does not allow nulls. INSERT fails.
The statement has been terminated.
Query for the above error
Insert into NewDB.dbo.UCC$CustDB2(No,Address)
select OLDDB.dbo.[Nav7 Demo$CustDB1].No,OLDDB.dbo.[Nav7 Demo$CustDB1].Address from OLDDB.dbo.[Nav7 Demo$CustDB1]
Where OLDDB.dbo.[Nav7 Demo$CustDB1].No not in (select NewDB.dbo.UCC$CustDB2.No from NewDB.dbo.UCC$CustDB2 )