I have a GUID value that is retreived from a table1 that I am trying to insert into table2. Both the source and destination tables have the datatype uniqueidentifier. However, on an insert to table2, this column is being set to null. Can we copy guid columns from one table to another? Or is the issue something else.
declare @myGUIDsrc uniqueidentifier
select @myGUIDsrc = column1 from table1 <---- only one row and GUID value is returned
insert into table2 (column1, column2) values (@myGUIDsrc , 'TEST')
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
Tomas Helgi Johannsson
8/22/2022 - Mon
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!