Hi guys and gals,I have a uniqueidentifier column and an nvarchar column. The names in the nvarchar column obviously have a uniqueidentifier. Those two columns reside in a table called contacts. The other table involved is called accessor and this outlines which id represents which user in the table. Normally a dataswap between two columns is simple, but I am running into trouble on this one because I need to join with accessor from table to get the uniqueidentifier for the name that is in the nvarchar column and that will replace the uniqueidentifier column, while then I need to go back to the accessor table to get the name from the first uniqueidentifier to place in the nvarchar column that moved to the uniqueidentifier column. Was that complex enough for you? haha, sorry it was so confusing. anwyays, I tried the following: declare @switch nvarchar(50)declare @switch2 uniqueidentifierupdate tbl_contact set @switch = (select name from tbl_contact join tbl_Accessor on accessorid=manageuserid), @switch2 = (select accessorid from tbl_contact join tbl_accessor on name = cust_salesperson_063927859), cust_salesperson_063927859 = @switch, manageuserid = @switch2
This did not work obviously because there are multiple records returned from the subqueries... HELP!