how to concatenate uniqueidentifier in a dynamic query
问题 I have a dynamic query in which I want to concatenate uniqueidentifier, but + and & operators are not supporting this, is there a way I can concatenate uniqueidentifier to a dynamic string. Any sample or any help in this regard will be highly appricated. 回答1: Have you tried casting or converting to a string first, then concating? CAST(NEWID() AS NVARCHAR(36)) 回答2: I know this is old but I ran into this post trying to figure out the same thing and the problem was that I didn't have enough 's