I have an sql table with the datatype uniqueidentifier and i want to update the table2 with the datatype uniqeindentifier with the code from the table1.
relationship: table1 <----> table2
When i made the insert in the table2, i have the error that the column in the table could not be empty.
Because uniqueidentifier is globally unique I don’t think you can copy it because it will then exist in two tables. Your error isn’t a duplicate GUID warning though. Perhaps the server is set to detect the violation and then clear the column?
Perhaps an alternative is to set the server to generate a new GUID in the uniqueidentifier column. If you need to preserve the old one for reference, create a string 16 column called ‘OldGUID’ in both the dictionary and server for table2; create a unique index on this in the server if you want to use it for backdated lookups of the old value. Then copy the Old GUID to that and let the server give you a new one in the uniqueidentifier column…