where t.[PortalID] = '
+convert(nvarchar(36), @.PortalID)+'where t.[PortalID] ='+ convert(nvarchar(36), @.PortalID) +'Im trying to concate a uniqueidentifier into a BIG nvarchar(4000) string so i can execute it at the end (
exec
sp_executesql @.sql)But my problem is that i got an error saying that i can not do so or the first 5 digit of the uniqueidentifier object is not well formated.
any ideas ? thank you
try:
where t.[PortalID] = '''+convert(nvarchar(36), @.PortalID)+'''
|||
It does not work.
|||
Needs to be quoted as per my previous post. However, I believe the you are getting a second problem. Most likely that you are trying to pass the uniqueidentifier from .NET code to sql, and you've either assigned the wrong type, or you have use concatenation that mangled the guid.
No comments:
Post a Comment